code: def test_get_read_credential_infos_respects_max_request_size(
      databricks_artifact_repo,
  ):
      """
      Verifies that the `_get_read_credential_infos` method, which is used to resolve read access
      credentials for a collection of artifacts, handles paginated responses properly, issuing
      incremental requests until all pages have been consumed
      """
      assert _MAX_CREDENTIALS_REQUEST_SIZE == 2000, (
          "The maximum request size configured by the client should be consistent with the"
          " Databricks backend. Only update this value of the backend limit has changed."
      )
  
      # Create 3 chunks of paths, two of which have the maximum request size and one of which
      # is smaller than the maximum chunk size. Aggregate and pass these to
      # `_get_read_credential_infos`, validating that this method decomposes the aggregate
      # list into these expected chunks and makes 3 separate requests
      paths_chunk_1 = ["path1"] * _MAX_CREDENTIALS_REQUEST_SIZE
      paths_chunk_2 = ["path2"] * _MAX_CREDENTIALS_REQUEST_SIZE
      paths_chunk_3 = ["path3"] * 5
      credential_infos_mock_1 = [
          ArtifactCredentialInfo(
              signed_uri="http://mock_url_1",
              type=ArtifactCredentialType.AWS_PRESIGNED_URL,
          )
          for _ in range(_MAX_CREDENTIALS_REQUEST_SIZE)
      ]
      credential_infos_mock_2 = [
          ArtifactCredentialInfo(
              signed_uri="http://mock_url_2",
              type=ArtifactCredentialType.AWS_PRESIGNED_URL,
          )
          for _ in range(_MAX_CREDENTIALS_REQUEST_SIZE)
      ]
      credential_infos_mock_3 = [
          ArtifactCredentialInfo(
              signed_uri="http://mock_url_3",
              type=ArtifactCredentialType.AWS_PRESIGNED_URL,
          )
          for _ in range(5)
      ]
  
      with mock.patch(
          f"{DATABRICKS_ARTIFACT_REPOSITORY_PACKAGE}.message_to_json"
      ) as message_mock, mock.patch(
          f"{DATABRICKS_ARTIFACT_REPOSITORY}._call_endpoint",
          side_effect=[
              GetCredentialsForRead.Response(
                  credential_infos=credential_infos_mock_1
              ),
              GetCredentialsForRead.Response(
                  credential_infos=credential_infos_mock_2
              ),
              GetCredentialsForRead.Response(
                  credential_infos=credential_infos_mock_3
              ),
          ],
      ) as call_endpoint_mock:
          databricks_artifact_repo._get_read_credential_infos(
              paths_chunk_1 + paths_chunk_2 + paths_chunk_3
          )
          assert call_endpoint_mock.call_count == 3
          assert message_mock.call_count == 3
          message_mock.assert_has_calls(
              [
                  mock.call(
                      GetCredentialsForRead(
                          run_id=MOCK_RUN_ID, path=paths_chunk_1
                      )
                  ),
                  mock.call(
                      GetCredentialsForRead(
                          run_id=MOCK_RUN_ID, path=paths_chunk_2
                      )
                  ),
                  mock.call(
                      GetCredentialsForRead(
                          run_id=MOCK_RUN_ID, path=paths_chunk_3
                      )
                  ),
              ]
          )
  
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 25 for calling a global function with example usage: test_get_read_credential_infos_respects_max_request_size(databricks_artifact_repo) without return types