code: def test_rest_tracking_api_list_artifacts_with_proxied_artifacts(
      artifacts_server, tmp_path
  ):
      def list_artifacts_via_rest_api(url, run_id, path=None):
          if path:
              resp = requests.get(
                  url, params={"run_id": run_id, "path": path}
              )
          else:
              resp = requests.get(url, params={"run_id": run_id})
          resp.raise_for_status()
          return resp.json()
  
      url = artifacts_server.url
      mlflow.set_tracking_uri(url)
      api = f"{url}/api/2.0/mlflow/artifacts/list"
  
      tmp_path_a = tmp_path.joinpath("a.txt")
      tmp_path_a.write_text("0")
      tmp_path_b = tmp_path.joinpath("b.txt")
      tmp_path_b.write_text("1")
      mlflow.set_experiment("rest_list_api_test")
      with mlflow.start_run() as run:
          mlflow.log_artifact(tmp_path_a)
          mlflow.log_artifact(tmp_path_b, "dir")
  
      list_artifacts_response = list_artifacts_via_rest_api(
          url=api, run_id=run.info.run_id
      )
      assert list_artifacts_response.get("files") == [
          {"path": "a.txt", "is_dir": False, "file_size": 1},
          {"path": "dir", "is_dir": True},
      ]
      assert (
          list_artifacts_response.get("root_uri")
          == run.info.artifact_uri
      )
  
      nested_list_artifacts_response = list_artifacts_via_rest_api(
          url=api, run_id=run.info.run_id, path="dir"
      )
      assert nested_list_artifacts_response.get("files") == [
          {"path": "dir/b.txt", "is_dir": False, "file_size": 1},
      ]
      assert (
          list_artifacts_response.get("root_uri")
          == run.info.artifact_uri
      )
  
imports: import cgi
  import os
  import pathlib
  import subprocess
  import tempfile
  from collections import namedtuple
  import pytest
  import requests
  import mlflow
  from mlflow import MlflowClient
  from mlflow.artifacts import download_artifacts
  from tests.helper_functions import LOCALHOST, get_safe_port
  from tests.tracking.integration_test_utils import _await_server_up_or_die
label_desc: Use image node_id 14 for calling a global function with example usage: test_rest_tracking_api_list_artifacts_with_proxied_artifacts(artifacts_server, tmp_path) and returns: resp