ider
importobjgraphfrompymplerimporttrackertr=tracker.SummaryTracker()""" Internal debug module The module provides functions for debugging test framework"""defon_tear_down_class(cls):gc.collect()tr.print_diff()objects=gc.get_objects()counter=0withopen(cls.tempdir+'/python_objects.txt','w')asf:interesting=[oforoinobjectsifisinstance(o,(VppPapiProvider,vpp_papi.VPP))]delobjectsgc.collect()foroininteresting:objgraph.show_backrefs([o],max_depth=5,filename="%s/%s.png"%(cls.tempdir,counter))counter+=1refs=gc.get_referrers(o)pp=pprint.PrettyPrinter(indent=2)f.write("%s\n"%pp.pformat(o))forrinrefs:try:f.write("%s\n"%pp.pformat(r))except:f.write("%s\n"%type(r))