def try_iter_content(types, depth=0):
 if (depth > 10):
  return
 for typ in types:
  try:
   f = typ.py__iter__
  except AttributeError:
   pass
  else:
   for iter_types in f():
    try_iter_content(iter_types, (depth + 1))

def try_iter_content ( types , depth = 0 ) : if ( depth > 10 ) : return for typ in types : try : f = typ . py__iter__ except AttributeError : pass else : for iter_types in f ( ) : try_iter_content ( iter_types , ( depth + 1 ) )
helper method for static analysis .