code: def test_log_artifacts(artifacts_server, tmp_path):
      url = artifacts_server.url
      mlflow.set_tracking_uri(url)
  
      tmp_path.joinpath("a.txt").write_text("0")
      d = tmp_path.joinpath("dir")
      d.mkdir()
      d.joinpath("b.txt").write_text("1")
  
      with mlflow.start_run() as run:
          mlflow.log_artifacts(tmp_path)
  
      client = MlflowClient()
      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"]
  
      # With `artifact_path`
      with mlflow.start_run() as run:
          mlflow.log_artifacts(tmp_path, artifact_path="artifact_path")
  
      artifacts = [
          a.path for a in client.list_artifacts(run.info.run_id)
      ]
      assert artifacts == ["artifact_path"]
      artifacts = [
          a.path
          for a in client.list_artifacts(
              run.info.run_id, "artifact_path"
          )
      ]
      assert sorted(artifacts) == [
          "artifact_path/a.txt",
          "artifact_path/dir",
      ]
      artifacts = [
          a.path
          for a in client.list_artifacts(
              run.info.run_id, "artifact_path/dir"
          )
      ]
      assert artifacts == ["artifact_path/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 9 for calling a global function with example usage: test_log_artifacts(artifacts_server, tmp_path) without return types