code: def test_log_artifact_with_relative_path(
      test_file, artifact_path, expected_location
  ):
      mock_credential_info = ArtifactCredentialInfo(
          signed_uri=MOCK_AZURE_SIGNED_URI,
          type=ArtifactCredentialType.AZURE_SAS_URI,
      )
      with mock.patch(
          f"{DATABRICKS_ARTIFACT_REPOSITORY}._get_run_artifact_root",
          return_value=MOCK_RUN_ROOT_URI,
      ), mock.patch(
          f"{DATABRICKS_ARTIFACT_REPOSITORY}._get_credential_infos",
          return_value=[mock_credential_info],
      ) as get_credential_infos_mock, mock.patch(
          f"{DATABRICKS_ARTIFACT_REPOSITORY}._upload_to_cloud",
          return_value=None,
      ) as upload_mock:
          databricks_artifact_repo = get_artifact_repository(
              MOCK_SUBDIR_ROOT_URI
          )
          databricks_artifact_repo.log_artifact(
              test_file, artifact_path
          )
          get_credential_infos_mock.assert_called_with(
              GetCredentialsForWrite, MOCK_RUN_ID, [expected_location]
          )
          artifact_file_path = posixpath.join(
              artifact_path or "", os.path.basename(test_file)
          )
          upload_mock.assert_called_with(
              cloud_credential_info=mock_credential_info,
              src_file_path=test_file,
              artifact_file_path=artifact_file_path,
          )
  
imports: import json
  import os
  import posixpath
  import re
  import shutil
  import time
  from unittest import mock
  from unittest.mock import ANY
  import pytest
  from requests.models import Response
  from mlflow.entities.file_info import FileInfo
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_artifacts_pb2 import ArtifactCredentialInfo, ArtifactCredentialType, CompleteMultipartUpload, CreateMultipartUpload, GetCredentialsForRead, GetCredentialsForWrite, GetPresignedUploadPartUrl
  from mlflow.protos.service_pb2 import FileInfo, ListArtifacts
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.artifact.databricks_artifact_repo import _MAX_CREDENTIALS_REQUEST_SIZE, DatabricksArtifactRepository
label_desc: Use image node_id 20 for calling a global function with example usage: test_log_artifact_with_relative_path(test_file, artifact_path, expected_location) without return types