def _import_modules(imports, dglobals):
 if (imports is not None):
  for stmt in imports:
   try:
    exec stmt in dglobals
   except TypeError:
    raise TypeError(('invalid type: %s' % stmt))
   except Exception:
    continue

def _import_modules ( imports , dglobals ) : if ( imports is not None ) : for stmt in imports : try : exec stmt in dglobals except TypeError : raise TypeError ( ( 'invalid type: %s' % stmt ) ) except Exception : continue
if given .