code: def train_epoch(epoch, dataloader, model, loss_fn, optimizer):
      if train.get_context().get_world_size() > 1:
          dataloader.sampler.set_epoch(epoch)
  
      for X, y in dataloader:
          # Compute prediction error
          pred = model(X)
          loss = loss_fn(pred, y)
  
          # Backpropagation
          optimizer.zero_grad()
          loss.backward()
          optimizer.step()
  
file_path: ray/python/ray/train/examples/pytorch/torch_linear_example.py
imports: import argparse
  import os
  import tempfile
  import numpy
  import torch
  import torch.nn
  import ray.train
  from ray.train import Checkpoint, RunConfig, ScalingConfig
  from ray.train.torch import TorchTrainer
label_desc: Use image node_id 1 for calling a global function with example usage: train_epoch(epoch, dataloader, model, loss_fn, optimizer) without return types