code: def test_remote_url():
      config = {
          "remote": {
              "base": {"url": "http://example.com"},
              "r1": {"url": "remote://base/r1", "user": "user"},
              "r2": {"url": "remote://r1/r2", "password": "123"},
          }
      }
      result = get_fs_config(config, url="remote://r2/foo")
      assert result == {
          "password": "123",
          "user": "user",
          "url": "http://example.com/r1/r2/foo",
      }
  
file_path: dvc/tests/unit/fs/test_fs.py
imports: import pytest
  from dvc_http import HTTPFileSystem, HTTPSFileSystem
  from dvc_s3 import S3FileSystem
  from dvc_ssh import SSHFileSystem
  from dvc.config import RemoteNotFoundError
  from dvc.fs import LocalFileSystem, get_cloud_fs, get_fs_cls, get_fs_config
label_desc: Use image node_id 4 for calling a global function with example usage: test_remote_url() without return types