code: def test_list_artifacts(dbfs_artifact_repo):
      with mock.patch("requests.Session.request") as mock_base_request:
          mock_base_request.return_value = Mock(
              text=json.dumps(LIST_ARTIFACTS_RESPONSE)
          )
          artifacts = dbfs_artifact_repo.list_artifacts()
          assert len(artifacts) == 2
          assert artifacts[0].path == "a.txt"
          assert artifacts[0].is_dir is False
          assert artifacts[0].file_size == 100
          assert artifacts[1].path == "dir"
          assert artifacts[1].is_dir is True
          assert artifacts[1].file_size is None
          mock_base_request.assert_called_with(
              "GET",
              "http://host/api/2.0/dbfs/list",
              allow_redirects=True,
              headers=mock.ANY,
              verify=True,
              timeout=mock.ANY,
              params={"path": "/test/"},
          )
          # Calling list_artifacts() on a path that's a file should return an empty list
          mock_base_request.return_value.text = json.dumps(
              LIST_ARTIFACTS_SINGLE_FILE_RESPONSE
          )
          list_on_file = dbfs_artifact_repo.list_artifacts("a.txt")
          assert len(list_on_file) == 0
          mock_base_request.assert_called_with(
              "GET",
              "http://host/api/2.0/dbfs/list",
              allow_redirects=True,
              headers=mock.ANY,
              verify=True,
              timeout=mock.ANY,
              params={"path": "/test/a.txt"},
          )
  
imports: import json
  import os
  from unittest import mock
  from unittest.mock import Mock
  import pytest
  from mlflow.exceptions import MlflowException
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.artifact.dbfs_artifact_repo import DbfsRestArtifactRepository, _get_host_creds_from_default_store
  from mlflow.store.tracking.file_store import FileStore
  from mlflow.store.tracking.rest_store import RestStore
  from mlflow.utils.rest_utils import MlflowHostCreds, http_request
label_desc: Use image node_id 13 for calling a global function with example usage: test_list_artifacts(dbfs_artifact_repo) without return types