def ModuleNameHasPrefix(module_name, prefix_set):
 for prefix in prefix_set:
  if (prefix == module_name):
   return True
  if module_name.startswith((prefix + '.')):
   return True
 return False

def ModuleNameHasPrefix ( module_name , prefix_set ) : for prefix in prefix_set : if ( prefix == module_name ) : return True if module_name . startswith ( ( prefix + '.' ) ) : return True return False
determines if a modules name belongs to a set of prefix strings .