def refget(objs, level=1):
 for _ in xrange(level):
  refs = gc.get_referrers(*objs)
  try:
   refs.remove(objs)
  except ValueError:
   pass
  objs = refs
 return refs

def refget ( objs , level = 1 ) : for _ in xrange ( level ) : refs = gc . get_referrers ( * objs ) try : refs . remove ( objs ) except ValueError : pass objs = refs return refs
get the referrers to the sequence of objects passed in .