code: def main():
      # print_env_vars()
      with monit.section("Distributed"):
          torch.distributed.init_process_group(
              "gloo",
              timeout=datetime.timedelta(seconds=30),
              init_method="env://",
          )
      conf = Configs()
      experiment.create(uuid=os.environ["RUN_UUID"], name="mnist ddp")
      experiment.distributed(
          int(os.environ["RANK"]), int(os.environ["WORLD_SIZE"])
      )
      experiment.configs(
          conf,
          {
              "optimizer.optimizer": "Adam",
              "optimizer.learning_rate": 1e-4,
              "model": "ddp_model",
              "device.cuda_device": int(os.environ["LOCAL_RANK"]),
          },
      )
      conf.set_seed.set()
      experiment.add_pytorch_models(dict(model=conf.model))
      with experiment.start():
          conf.run()
  
imports: import datetime
  import os
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  import torch.utils.data
  from labml_helpers.datasets.mnist import MNISTConfigs
  from labml_helpers.device import DeviceConfigs
  from labml_helpers.metrics.accuracy import Accuracy
  from labml_helpers.module import Module
  from labml_helpers.seed import SeedConfigs
  from labml_helpers.train_valid import TrainValidConfigs, BatchIndex
  from torch.nn.parallel import DistributedDataParallel
  from labml import experiment, monit
  from labml import tracker
  from labml.configs import option
  from labml.logger import inspect
  from labml.utils import pytorch
label_desc: Use image node_id 5 for calling a global function with example usage: main() without return types