code: def test_list_checkpoints_errors_on_only_sort_by_set(
      make_expref: Callable[[int], experiment.Experiment],
  ) -> None:
      expref = make_expref(1)
  
      with pytest.raises(AssertionError):
          expref.list_checkpoints(
              sort_by=checkpoint.CheckpointSortBy.UUID,
              order_by=None,
              max_results=5,
          )
  
imports: import base64
  import math
  import os
  from typing import Callable
  from unittest import mock
  import pytest
  import requests
  import responses
  from determined.common import api
  from determined.common.api import bindings
  from determined.common.experimental import checkpoint, determined, experiment
  from tests.fixtures import api_responses
label_desc: Use image node_id 18 for calling a global function with example usage: test_list_checkpoints_errors_on_only_sort_by_set(make_expref) without return types