code: def initialize(config):
      device = idist.device()
  
      model = config.model.to(device)
      optimizer = config.optimizer
  
      # Adapt model to dist config
      model = idist.auto_model(model)
      optimizer = idist.auto_optim(optimizer)
      criterion = config.criterion.to(device)
  
      return model, optimizer, criterion
  
file_path: ignite/examples/references/segmentation/pascal_voc2012/utils.py
imports: import torch
  import ignite
  import ignite.distributed
  from ignite.handlers import DiskSaver
label_desc: Use image node_id 1 for calling a global function with example usage: initialize(config) and returns: model,  optimizer,  criterion