code: def __init__(self, context: det_ds.DeepSpeedTrialContext):
      self.context = context
      self.hparams = attrdict.AttrDict(context.get_hparams())
      self.ds_config = attrdict.AttrDict(self.hparams.deepspeed_config)
      model1 = torch.nn.Linear(1, 1)
      model2 = torch.nn.Linear(1, 1)
      self.loss = torch.nn.MSELoss()
      self.model1, _, _, _ = deepspeed.initialize(
          model=model1,
          config=self.ds_config,
          model_parameters=model1.parameters(),
      )
      self.model2, _, _, _ = deepspeed.initialize(
          model=model2,
          config=self.ds_config,
          model_parameters=model2.parameters(),
      )
      self.model1 = self.context.wrap_model_engine(self.model1)
      self.model2 = self.context.wrap_model_engine(self.model2)
  
imports: from typing import Any, Dict, Iterator, Optional, Tuple, Union
  import attrdict
  import deepspeed
  import deepspeed.runtime.dataloader
  import numpy
  import torch
  import determined.pytorch.deepspeed
  import tests.experiment.fixtures.pytorch_counter_callback
  from determined import pytorch
label_desc: Use image node_id 1 to create a new LinearTwoEngineTrial object from inherited base classes: LinearDeepSpeedTrial with example: obj = LinearTwoEngineTrial(context)