code: def test_list_artifacts_with_relative_path():
      list_artifact_file_proto_mock = [
          FileInfo(
              path=posixpath.join(MOCK_SUBDIR, "a.txt"),
              is_dir=False,
              file_size=0,
          )
      ]
      list_artifacts_dir_proto_mock = [
          FileInfo(
              path=posixpath.join(MOCK_SUBDIR, "test/a.txt"),
              is_dir=False,
              file_size=100,
          ),
          FileInfo(
              path=posixpath.join(MOCK_SUBDIR, "test/dir"),
              is_dir=True,
              file_size=0,
          ),
      ]
      with mock.patch(
          f"{DATABRICKS_ARTIFACT_REPOSITORY}._get_run_artifact_root",
          return_value=MOCK_RUN_ROOT_URI,
      ), mock.patch(
          f"{DATABRICKS_ARTIFACT_REPOSITORY_PACKAGE}.message_to_json",
          return_value=None,
      ) as message_mock:
          list_artifact_response_proto = ListArtifacts.Response(
              root_uri="",
              files=list_artifacts_dir_proto_mock,
              next_page_token=None,
          )
          with mock.patch(
              f"{DATABRICKS_ARTIFACT_REPOSITORY}._call_endpoint",
              return_value=list_artifact_response_proto,
          ):
              databricks_artifact_repo = get_artifact_repository(
                  MOCK_SUBDIR_ROOT_URI
              )
              artifacts = databricks_artifact_repo.list_artifacts(
                  "test"
              )
              assert isinstance(artifacts, list)
              assert isinstance(artifacts[0], FileInfoEntity)
              assert len(artifacts) == 2
              assert artifacts[0].path == "test/a.txt"
              assert artifacts[0].is_dir is False
              assert artifacts[0].file_size == 100
              assert artifacts[1].path == "test/dir"
              assert artifacts[1].is_dir is True
              assert artifacts[1].file_size is None
              message_mock.assert_called_with(
                  ListArtifacts(
                      run_id=MOCK_RUN_ID,
                      path=posixpath.join(MOCK_SUBDIR, "test"),
                  )
              )
  
          # Calling list_artifacts() on a relative path that's a file should return an empty list
          with mock.patch(
              f"{DATABRICKS_ARTIFACT_REPOSITORY}._call_endpoint",
              return_value=ListArtifacts.Response(
                  root_uri="",
                  files=list_artifact_file_proto_mock,
                  next_page_token=None,
              ),
          ):
              artifacts = databricks_artifact_repo.list_artifacts(
                  "a.txt"
              )
              assert len(artifacts) == 0
  
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 22 for calling a global function with example usage: test_list_artifacts_with_relative_path() without return types