'Factory that creates an app config from an entry in INSTALLED_APPS.'

@classmethod
def create(cls, entry):

    try:
        module = import_module(entry)
    except ImportError:
        module = None
        (mod_path, _, cls_name) = entry.rpartition('.')
        if (not mod_path):
            raise
    else:
        try:
            entry = module.default_app_config
        except AttributeError:
            return cls(entry, module)
        else:
            (mod_path, _, cls_name) = entry.rpartition('.')
    mod = import_module(mod_path)
    try:
        cls = getattr(mod, cls_name)
    except AttributeError:
        if (module is None):
            import_module(entry)
        else:
            raise
    if (not issubclass(cls, AppConfig)):
        raise ImproperlyConfigured(("'%s'    isn't    a    subclass    of    AppConfig." % entry))
    try:
        app_name = cls.name
    except AttributeError:
        raise ImproperlyConfigured(("'%s'    must    supply    a    name    attribute." % entry))
    try:
        app_module = import_module(app_name)
    except ImportError:
        raise ImproperlyConfigured(("Cannot    import    '%s'.    Check    that    '%s.%s.name'    is    correct." % (app_name, mod_path, cls_name)))
    return cls(app_name, app_module)
