code: def test_pagination(
      page_token, max_results, matching_runs, expected_next_page_token
  ):
      runs = [
          Run(
              run_info=RunInfo(
                  run_uuid="0",
                  run_id="0",
                  experiment_id=0,
                  user_id="user-id",
                  status=RunStatus.to_string(RunStatus.FAILED),
                  start_time=0,
                  end_time=1,
                  lifecycle_stage=LifecycleStage.ACTIVE,
              ),
              run_data=RunData([], [], []),
          ),
          Run(
              run_info=RunInfo(
                  run_uuid="1",
                  run_id="1",
                  experiment_id=0,
                  user_id="user-id",
                  status=RunStatus.to_string(RunStatus.FAILED),
                  start_time=0,
                  end_time=1,
                  lifecycle_stage=LifecycleStage.ACTIVE,
              ),
              run_data=RunData([], [], []),
          ),
          Run(
              run_info=RunInfo(
                  run_uuid="2",
                  run_id="2",
                  experiment_id=0,
                  user_id="user-id",
                  status=RunStatus.to_string(RunStatus.FAILED),
                  start_time=0,
                  end_time=1,
                  lifecycle_stage=LifecycleStage.ACTIVE,
              ),
              run_data=RunData([], [], []),
          ),
      ]
      encoded_page_token = None
      if page_token:
          encoded_page_token = base64.b64encode(
              json.dumps(page_token).encode("utf-8")
          )
      paginated_runs, next_page_token = SearchUtils.paginate(
          runs, encoded_page_token, max_results
      )
  
      paginated_run_indices = []
      for run in paginated_runs:
          for i, r in enumerate(runs):
              if r == run:
                  paginated_run_indices.append(i)
                  break
      assert paginated_run_indices == matching_runs
  
      decoded_next_page_token = None
      if next_page_token:
          decoded_next_page_token = json.loads(
              base64.b64decode(next_page_token)
          )
      assert decoded_next_page_token == expected_next_page_token
  
imports: import base64
  import json
  import re
  import pytest
  from mlflow.entities import Dataset, DatasetInput, InputTag, LifecycleStage, Metric, Param, Run, RunData, RunInfo, RunInputs, RunStatus, RunTag
  from mlflow.exceptions import MlflowException
  from mlflow.utils.mlflow_tags import MLFLOW_DATASET_CONTEXT
  from mlflow.utils.search_utils import SearchUtils
label_desc: Use image node_id 17 for calling a global function with example usage: test_pagination(page_token, max_results, matching_runs, expected_next_page_token) without return types