code: def setup_method(self) -> None:
      self.config = {
          "hyperparameters": {
              "global_batch_size": 4,
              "dataloader_type": "determined",
          }
      }
      core_context, env = det._make_local_execution_env(
          managed_training=False,
          test_mode=False,
          config=self.config,
          checkpoint_dir="/tmp",
          limit_gpus=1,
      )
  
      context = pytorch.PyTorchTrialContext(
          core_context=core_context,
          trial_seed=env.trial_seed,
          hparams=self.config["hyperparameters"],
          slots_per_trial=1,
          num_gpus=1,
          exp_conf=self.config,
          aggregation_frequency=1,
          steps_completed=0,
          managed_training=False,
          debug_enabled=False,
      )
  
      context._set_default_gradient_compression(False)
      context._set_default_average_aggregated_gradients(True)
  
      assert isinstance(context, pytorch.PyTorchTrialContext)
      self.context = context
  
file_path: determined/harness/tests/experiment/pytorch/test_pytorch_context.py
imports: import pytest
  import torch
  import determined
  from determined import errors, pytorch
label_desc: Use image node_id 1 for calling the TestPyTorchContext obj's underlying member method code with example usage: obj.setup_method() without return types