code: def test_list_artifacts(artifacts_server, tmp_path):
      url = artifacts_server.url
      mlflow.set_tracking_uri(url)
  
      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")
      client = MlflowClient()
      with mlflow.start_run() as run:
          assert client.list_artifacts(run.info.run_id) == []
          mlflow.log_artifact(tmp_path_a)
          mlflow.log_artifact(tmp_path_b, "dir")
  
      artifacts = [
          a.path for a in client.list_artifacts(run.info.run_id)
      ]
      assert sorted(artifacts) == ["a.txt", "dir"]
      artifacts = [
          a.path for a in client.list_artifacts(run.info.run_id, "dir")
      ]
      assert artifacts == ["dir/b.txt"]
  
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 10 for calling a global function with example usage: test_list_artifacts(artifacts_server, tmp_path) without return types