code: def test_list_artifacts_handles_pagination(databricks_artifact_repo):
      list_artifacts_proto_mock_1 = [
          FileInfo(path="a.txt", is_dir=False, file_size=100),
          FileInfo(path="b", is_dir=True, file_size=0),
      ]
      list_artifacts_proto_mock_2 = [
          FileInfo(path="c.txt", is_dir=False, file_size=100),
          FileInfo(path="d", is_dir=True, file_size=0),
      ]
      list_artifacts_proto_mock_3 = [
          FileInfo(path="e.txt", is_dir=False, file_size=100),
          FileInfo(path="f", is_dir=True, file_size=0),
      ]
      list_artifacts_proto_mock_4 = []
      list_artifact_paginated_response_protos = [
          ListArtifacts.Response(
              root_uri="",
              files=list_artifacts_proto_mock_1,
              next_page_token="2",
          ),
          ListArtifacts.Response(
              root_uri="",
              files=list_artifacts_proto_mock_2,
              next_page_token="4",
          ),
          ListArtifacts.Response(
              root_uri="",
              files=list_artifacts_proto_mock_3,
              next_page_token="6",
          ),
          ListArtifacts.Response(
              root_uri="",
              files=list_artifacts_proto_mock_4,
              next_page_token="8",
          ),
      ]
      with mock.patch(
          f"{DATABRICKS_ARTIFACT_REPOSITORY_PACKAGE}.message_to_json",
          return_value=None,
      ) as message_mock, mock.patch(
          f"{DATABRICKS_ARTIFACT_REPOSITORY}._call_endpoint",
          side_effect=list_artifact_paginated_response_protos,
      ):
          artifacts = databricks_artifact_repo.list_artifacts()
          assert {file.path for file in artifacts} == {
              "a.txt",
              "b",
              "c.txt",
              "d",
              "e.txt",
              "f",
          }
          calls = [
              mock.call(ListArtifacts(run_id=MOCK_RUN_ID, path="")),
              mock.call(
                  ListArtifacts(
                      run_id=MOCK_RUN_ID, path="", page_token="2"
                  )
              ),
              mock.call(
                  ListArtifacts(
                      run_id=MOCK_RUN_ID, path="", page_token="4"
                  )
              ),
              mock.call(
                  ListArtifacts(
                      run_id=MOCK_RUN_ID, path="", page_token="6"
                  )
              ),
          ]
          message_mock.assert_has_calls(calls)
  
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 23 for calling a global function with example usage: test_list_artifacts_handles_pagination(databricks_artifact_repo) without return types