def METHOD_NAME():
    opts_override = textwrap.dedent(
        """
        gitfs_root: salt
        gitfs_saltenv:
          - baz:
            # when loaded, the "salt://" prefix will be removed
            - mountpoint: salt://baz_mountpoint
            - ref: baz_branch
            - root: baz_root
        gitfs_remotes:
          - file://{0}tmp/repo1:
            - saltenv:
              - foo:
                - ref: foo_branch
                - root: foo_root
          - file://{0}tmp/repo2:
            - mountpoint: repo2
            - saltenv:
              - baz:
                - mountpoint: abc
    """.format(
            "/" if salt.utils.platform.is_windows() else ""
        )
    )
    with patch.dict(gitfs.__opts__, salt.utils.yaml.safe_load(opts_override)):
        git_fs = salt.utils.gitfs.GitFS(
            gitfs.__opts__,
            gitfs.__opts__["gitfs_remotes"],
            per_remote_overrides=gitfs.PER_REMOTE_OVERRIDES,
            per_remote_only=gitfs.PER_REMOTE_ONLY,
        )
    # repo1 (branch: foo)
    # The mountpoint should take the default (from gitfs_mountpoint), while
    # ref and root should take the per-saltenv params.
    assert git_fs.remotes[0].mountpoint("foo") == ""
    assert git_fs.remotes[0].ref("foo") == "foo_branch"
    assert git_fs.remotes[0].root("foo") == "foo_root"
    # repo1 (branch: bar)
    # The 'bar' branch does not have a per-saltenv configuration set, so
    # each of the below values should fall back to global values.
    assert git_fs.remotes[0].mountpoint("bar") == ""
    assert git_fs.remotes[0].ref("bar") == "bar"
    assert git_fs.remotes[0].root("bar") == "salt"
    # repo1 (branch: baz)
    # The 'baz' branch does not have a per-saltenv configuration set, but
    # it is defined in the gitfs_saltenv parameter, so the values
    # from that parameter should be returned.
    assert git_fs.remotes[0].mountpoint("baz") == "baz_mountpoint"
    assert git_fs.remotes[0].ref("baz") == "baz_branch"
    assert git_fs.remotes[0].root("baz") == "baz_root"
    # repo2 (branch: foo)
    # The mountpoint should take the per-remote mountpoint value of
    # 'repo2', while ref and root should fall back to global values.
    assert git_fs.remotes[1].mountpoint("foo") == "repo2"
    assert git_fs.remotes[1].ref("foo") == "foo"
    assert git_fs.remotes[1].root("foo") == "salt"
    # repo2 (branch: bar)
    # The 'bar' branch does not have a per-saltenv configuration set, so
    # the mountpoint should take the per-remote mountpoint value of
    # 'repo2', while ref and root should fall back to global values.
    assert git_fs.remotes[1].mountpoint("bar") == "repo2"
    assert git_fs.remotes[1].ref("bar") == "bar"
    assert git_fs.remotes[1].root("bar") == "salt"
    # repo2 (branch: baz)
    # The 'baz' branch has the mountpoint configured as a per-saltenv
    # parameter. The other two should take the values defined in
    # gitfs_saltenv.
    assert git_fs.remotes[1].mountpoint("baz") == "abc"
    assert git_fs.remotes[1].ref("baz") == "baz_branch"
    assert git_fs.remotes[1].root("baz") == "baz_root"