code: def make_mock_cluster_info(
      container_addrs: List[str],
      container_rank: int,
      num_slots: int,
      latest_checkpoint: Optional[str] = None,
  ) -> det.ClusterInfo:
      config = utils.make_default_exp_config({}, 100, "loss", None)
      trial_info_mock = det.TrialInfo(
          trial_id=1,
          experiment_id=1,
          trial_seed=0,
          hparams={},
          config=config,
          steps_completed=0,
          trial_run_id=0,
          debug=False,
          inter_node_network_interface=None,
      )
      rendezvous_info_mock = det.RendezvousInfo(
          container_addrs=container_addrs,
          container_rank=container_rank,
          container_slot_counts=[
              int(num_slots / len(container_addrs))
              for _ in container_addrs
          ],
      )
      cluster_info_mock = det.ClusterInfo(
          master_url="localhost",
          cluster_id="clusterId",
          agent_id="agentId",
          slot_ids=list(range(num_slots)),
          task_id="taskId",
          allocation_id="allocationId",
          session_token="sessionToken",
          task_type="TRIAL",
          rendezvous_info=rendezvous_info_mock,
          trial_info=trial_info_mock,
          latest_checkpoint=latest_checkpoint,
      )
      return cluster_info_mock
  
file_path: determined/harness/tests/launch/test_util.py
imports: import contextlib
  import io
  import os
  import sys
  from typing import Callable, Dict, Iterator, List, Optional
  import determined
  from tests.experiment import utils
label_desc: Use image node_id 1 for calling a global function with example usage: make_mock_cluster_info(container_addrs, container_rank, num_slots, latest_checkpoint) and returns: cluster_info_mock