code: def _from_env(cls) -> "TrialInfo":
      assert (
          "DET_TRIAL_ID" in os.environ
      ), "must be run inside a Trial container"
      experiment_config = json.loads(
          os.environ["DET_EXPERIMENT_CONFIG"]
      )
      return cls(
          trial_id=int(os.environ["DET_TRIAL_ID"]),
          experiment_id=int(os.environ["DET_EXPERIMENT_ID"]),
          trial_seed=int(os.environ["DET_TRIAL_SEED"]),
          hparams=json.loads(os.environ["DET_HPARAMS"]),
          config=experiment_config,
          steps_completed=int(os.environ["DET_STEPS_COMPLETED"]),
          trial_run_id=int(os.environ["DET_TRIAL_RUN_ID"]),
          debug=experiment_config.get("debug", False),
          inter_node_network_interface=os.environ.get(
              "DET_INTER_NODE_NETWORK_INTERFACE"
          ),
      )
  
imports: import json
  import os
  from typing import Any, Dict, Iterable, List, Optional, Union
  from determined import gpu
label_desc: Use image node_id 2 for calling the TrialInfo obj's underlying member method code with example usage: obj._from_env(cls) and returns: cls