code: def test_log_artifact(artifacts_server, tmp_path):
      url = artifacts_server.url
      artifacts_destination = artifacts_server.artifacts_destination
      mlflow.set_tracking_uri(url)
  
      tmp_path = tmp_path.joinpath("a.txt")
      tmp_path.write_text("0")
  
      with mlflow.start_run() as run:
          mlflow.log_artifact(tmp_path)
  
      experiment_id = "0"
      run_artifact_root = os.path.join(
          artifacts_destination,
          experiment_id,
          run.info.run_id,
          "artifacts",
      )
      dest_path = os.path.join(run_artifact_root, tmp_path.name)
      assert os.path.exists(dest_path)
      assert read_file(dest_path) == "0"
  
      with mlflow.start_run() as run:
          mlflow.log_artifact(tmp_path, artifact_path="artifact_path")
  
      run_artifact_root = os.path.join(
          artifacts_destination,
          experiment_id,
          run.info.run_id,
          "artifacts",
      )
      dest_path = os.path.join(
          run_artifact_root, "artifact_path", tmp_path.name
      )
      assert os.path.exists(dest_path)
      assert read_file(dest_path) == "0"
  
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 8 for calling a global function with example usage: test_log_artifact(artifacts_server, tmp_path) without return types