def load_from_env_named_file(obj, env, key, validate, identifier, mod_file):
    """Load from env named file e.g: development_settings.py"""
    if mod_file.endswith(".py"):
        if ".secrets.py" == mod_file:
            tmpl = ".{0}_{1}{2}"
            mod_file = "secrets.py"
        else:
            tmpl = "{0}_{1}{2}"

        dirname = os.path.dirname(mod_file)
        filename, extension = os.path.splitext(os.path.basename(mod_file))
        new_filename = tmpl.format(env.lower(), filename, extension)
        env_mod_file = os.path.join(dirname, new_filename)
        global_filename = tmpl.format("global", filename, extension)
        global_mod_file = os.path.join(dirname, global_filename)
    else:
        parts = mod_file.rsplit(".", 1)
        if len(parts) > 1:
            head, tail = parts
        else:
            head, tail = None, parts[0]
        tail = env_mod_file = f"{env.lower()}_{tail}"

        if head:
            env_mod_file = f"{head}.{tail}"
            global_mod_file = f"{head}.global_{tail}"
        else:
            env_mod_file = tail
            global_mod_file = f"global_{tail}"

    source_metadata = SourceMetadata(
        loader="py",
        identifier=identifier,
        env=env,
    )
    py_loader.load(
        obj,
        env_mod_file,
        identifier=source_metadata,
        silent=True,
        key=key,
        validate=validate,
    )

    # load from global_settings.py
    py_loader.load(
        obj,
        global_mod_file,
        identifier="py_global",
        silent=True,
        key=key,
        validate=validate,
    )
Load from env named file e.g: development_settings.py
dynaconf/loaders/__init__.py