code: def get_fs_config(config, **kwargs):
      name = kwargs.get("name")
      if name:
          try:
              remote_conf = config["remote"][name.lower()]
          except KeyError:
              from dvc.config import RemoteNotFoundError
  
              raise RemoteNotFoundError(
                  f"remote '{name}' doesn't exist"
              )  # noqa: B904
      else:
          remote_conf = kwargs
      return _resolve_remote_refs(config, remote_conf)
  
file_path: dvc/dvc/fs/__init__.py
imports: from typing import Optional
  from urllib.parse import urlparse
  from dvc_http import HTTPFileSystem, HTTPSFileSystem
  from dvc.config import ConfigError
  from dvc.config_schema import SCHEMA, Invalid
  from dvc_objects.fs import LocalFileSystem, MemoryFileSystem, Schemes, generic, get_fs_cls, known_implementations, localfs, registry, system, utils
  from dvc_objects.fs.base import AnyFSPath, FileSystem
  from dvc_objects.fs.errors import AuthError, ConfigError, RemoteMissingDepsError
  from .callbacks import Callback
  from .data import DataFileSystem
  from .dvc import DVCFileSystem
  from .git import GitFileSystem
label_desc: Use image node_id 3 for calling a global function with example usage: get_fs_config(config) and returns: _resolve_remote_refs