code: def test_list_checkpoints_calls_bindings_sortByAttr_with_sort_by_attr(
      mock_bindings: mock.MagicMock,
      make_trialref: Callable[[int], trial.Trial],
  ) -> None:
      trialref = make_trialref(1)
      ckpt_resp = api_responses.sample_get_trial_checkpoints()
      mock_bindings.side_effect = [ckpt_resp]
  
      sort_by_attr = checkpoint.CheckpointSortBy.SEARCHER_METRIC
      trialref.list_checkpoints(
          sort_by=sort_by_attr, order_by=determined.OrderBy.ASC
      )
  
      _, call_kwargs = mock_bindings.call_args_list[0]
  
      assert call_kwargs["sortByAttr"] == sort_by_attr._to_bindings()
  
file_path: determined/harness/tests/determined/common/experimental/test_trial.py
imports: import datetime
  from typing import Callable, no_type_check
  from unittest import mock
  import pytest
  import responses
  from determined.common import api
  from determined.common.experimental import checkpoint, determined, trial
  from tests.fixtures import api_responses
label_desc: Use image node_id 7 for calling a global function with example usage: test_list_checkpoints_calls_bindings_sortByAttr_with_sort_by_attr(mock_bindings, make_trialref) without return types