code: def setup(self, config):
      use_cuda = config.get("use_gpu") and torch.cuda.is_available()
      self.device = torch.device("cuda" if use_cuda else "cpu")
      self.train_loader, self.test_loader = get_data_loaders()
      self.model = ConvNet().to(self.device)
      self.optimizer = optim.SGD(
          self.model.parameters(),
          lr=config.get("lr", 0.01),
          momentum=config.get("momentum", 0.9),
      )
  
file_path: ray/python/ray/tune/examples/mnist_pytorch_trainable.py
imports: from __future__ import print_function
  import argparse
  import os
  import torch
  import torch.optim
  import ray
  from ray import train, tune
  from ray.tune.schedulers import ASHAScheduler
  from ray.tune.examples.mnist_pytorch import train_func, test_func, get_data_loaders, ConvNet
label_desc: Use image node_id 1 for calling the TrainMNIST obj's underlying member method code with example usage: obj.setup(config) without return types