def is_valid_module(filename):
 if (not filename.endswith('.py')):
  return False
 if (filename == '__init__.py'):
  return True
 for prefix in IGNORED_PREFIXES:
  if filename.startswith(prefix):
   return False
 return True

def is_valid_module ( filename ) : if ( not filename . endswith ( '.py' ) ) : return False if ( filename == '__init__.py' ) : return True for prefix in IGNORED_PREFIXES : if filename . startswith ( prefix ) : return False return True
determines if a filename is a valid python module .