code: def make_default_env_context(
      hparams: Dict[str, Any],
      experiment_config: Dict,
      trial_seed: int = 0,
      latest_checkpoint: Optional[str] = None,
      steps_completed: int = 0,
      expose_gpus: bool = False,
  ) -> det.EnvContext:
      assert (latest_checkpoint is None) == (steps_completed == 0)
  
      if expose_gpus:
          gpu_uuids = gpu.get_gpu_uuids()
          use_gpu = bool(gpu_uuids)
      else:
          gpu_uuids = []
          use_gpu = False
  
      return det.EnvContext(
          experiment_config=experiment_config,
          master_url="",
          master_cert_file=None,
          master_cert_name=None,
          hparams=hparams,
          latest_checkpoint=latest_checkpoint,
          steps_completed=steps_completed,
          use_gpu=use_gpu,
          container_gpus=gpu_uuids,
          slot_ids=[],
          debug=False,
          det_trial_id="1",
          det_experiment_id="1",
          det_agent_id="1",
          det_cluster_id="uuid-123",
          trial_seed=trial_seed,
          trial_run_id=1,
          allocation_id="",
          managed_training=True,
          test_mode=False,
          on_cluster=False,
      )
  
imports: import importlib
  import os
  import pathlib
  import re
  import unittest.mock
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Type
  import numpy
  import pytest
  from mypy_extensions import DefaultNamedArg
  import determined
  from determined import core, gpu, workload
  from determined.common import util
label_desc: Use image node_id 2 for calling a global function with example usage: make_default_env_context(hparams, experiment_config, trial_seed, latest_checkpoint, steps_completed, expose_gpus) and returns: det