def _matching_loader_thinks_module_is_package(loader, mod_name):
 if hasattr(loader, 'is_package'):
  return loader.is_package(mod_name)
 elif ((loader.__class__.__module__ == '_frozen_importlib') and (loader.__class__.__name__ == 'NamespaceLoader')):
  return True
 raise AttributeError(('%s.is_package() method is missing but is required by Flask of PEP 302 import hooks.  If you do not use import hooks and you encounter this error please file a bug against Flask.' % loader.__class__.__name__))

def _matching_loader_thinks_module_is_package ( loader , mod_name ) : if hasattr ( loader , 'is_package' ) : return loader . is_package ( mod_name ) elif ( ( loader . __class__ . __module__ == '_frozen_importlib' ) and ( loader . __class__ . __name__ == 'NamespaceLoader' ) ) : return True raise AttributeError ( ( '%s.is_package() method is missing but is required by Flask of PEP 302 import hooks.  If you do not use import hooks and you encounter this error please file a bug against Flask.' % loader . __class__ . __name__ ) )
given the loader that loaded a module and the module this function attempts to figure out if the given module is actually a package .