code: def train_data_creator(config, batch_size):
      def get_training_set(upscale_factor):
          root_dir = download_bsd300()
          train_dir = join(root_dir, "train")
          crop_size = calculate_valid_crop_size(256, upscale_factor)
  
          return DatasetFromFolder(
              train_dir,
              input_transform=input_transform(
                  crop_size, upscale_factor
              ),
              target_transform=target_transform(crop_size),
          )
  
      train_set = get_training_set(config.get("upscale_factor", 3))
      training_data_loader = DataLoader(
          dataset=train_set,
          batch_size=batch_size,
          num_workers=config.get("threads", 4),
          shuffle=True,
      )
      return training_data_loader
  
imports: from __future__ import print_function
  import argparse
  from math import log10
  from PIL import Image
  import urllib
  import tarfile
  from os import makedirs, remove, listdir
  from os.path import exists, join, basename
  import torch
  import torch.utils.data
  import torch.nn
  import torch.optim
  import torch.nn.init
  from torch.utils.data import DataLoader
  from torchvision.transforms import Compose, CenterCrop, ToTensor, Resize
  from zoo.orca import init_orca_context, stop_orca_context
  from zoo.orca.learn.pytorch import Estimator
  from zoo.orca.learn.metrics import MSE
  from zoo.orca.learn.trigger import EveryEpoch
label_desc: Use image node_id 8 for calling a global function with example usage: train_data_creator(config, batch_size) and returns: training_data_loader, DatasetFromFolder