def _get_installed_apps_entry(app_name):
 for installed_app in settings.INSTALLED_APPS:
  if ((installed_app == app_name) or installed_app.endswith(('.' + app_name))):
   return installed_app
 return None

def _get_installed_apps_entry ( app_name ) : for installed_app in settings . INSTALLED_APPS : if ( ( installed_app == app_name ) or installed_app . endswith ( ( '.' + app_name ) ) ) : return installed_app return None
given an app name .