class_docstr: Trainer to be used if you want want use only a single training process.
code: def train(self, task):
      if task.use_gpu:
          logging.info("Using GPU, CUDA device index: {}".format(0))
          set_cuda_device_index(0)
      else:
          logging.info("Using CPU")
          set_cpu_device()
  
      super().train(task)
  
imports: import logging
  from typing import Optional
  from classy_vision.generic.distributed_util import set_cpu_device, set_cuda_device_index
  from .classy_trainer import ClassyTrainer
label_desc: Use image node_id 1 for calling the LocalTrainer obj's underlying member method code with example usage: obj.train(task) without return types