def METHOD_NAME(path, fs=None, **_kwargs):
    _config = cache_config.copy()
    if os.path.isdir(url):
        fs = fs or localfs
        repo_path = os.path.join(url, *fs.path.relparts(path, root_dir))
        _config.update(_get_remote_config(repo_path))
    return Repo(path, fs=fs, config=_config, **_kwargs)