code: def test_log_artifact_windows_path_with_hostname(text_artifact):
      experiment_test_1_artifact_location = (
          r"\\my_server\my_path\my_sub_path\1"
      )
      experiment_test_1_id = mlflow.create_experiment(
          "test_exp_d", experiment_test_1_artifact_location
      )
      with mlflow.start_run(experiment_id=experiment_test_1_id) as run:
          with mock.patch("shutil.copy2") as copyfile_mock, mock.patch(
              "os.path.exists", return_value=True
          ) as exists_mock:
              mlflow.log_artifact(text_artifact.artifact_path)
              copyfile_mock.assert_called_once()
              exists_mock.assert_called_once()
              local_path = mlflow.artifacts.download_artifacts(
                  run_id=run.info.run_id,
                  artifact_path=text_artifact.artifact_name,
              )
              assert (
                  rf"{experiment_test_1_artifact_location}\{run.info.run_id}"
                  rf"\artifacts\{text_artifact.artifact_name}"
                  == local_path
              )
  
imports: import pathlib
  import uuid
  from collections import namedtuple
  from typing import NamedTuple
  from unittest import mock
  import pytest
  import mlflow
  from mlflow.exceptions import MlflowException
  from mlflow.utils.file_utils import mkdir, path_to_local_file_uri
  from mlflow.utils.os import is_windows
label_desc: Use image node_id 20 for calling a global function with example usage: test_log_artifact_windows_path_with_hostname(text_artifact) without return types