def _find_frame_imports(name, frame):
 imports = frame.nodes_of_class((astroid.Import, astroid.From))
 for import_node in imports:
  for (import_name, import_alias) in import_node.names:
   if import_alias:
    if (import_alias == name):
     return True
   elif (import_name and (import_name == name)):
    return True

def _find_frame_imports ( name , frame ) : imports = frame . nodes_of_class ( ( astroid . Import , astroid . From ) ) for import_node in imports : for ( import_name , import_alias ) in import_node . names : if import_alias : if ( import_alias == name ) : return True elif ( import_name and ( import_name == name ) ) : return True
detect imports in the frame .