code: def resize_dataset(x, image_size):
      num_data = x.shape[0]
      dim = x.shape[1]
      X = np.zeros(
          shape=(num_data, dim, image_size, image_size),
          dtype=np.float32,
      )
      for n in range(0, num_data):
          for d in range(0, dim):
              X[n, d, :, :] = np.array(
                  Image.fromarray(x[n, d, :, :]).resize(
                      (image_size, image_size), Image.BILINEAR
                  ),
                  dtype=np.float32,
              )
      return X
  
imports: from src.eva_engine.phase1.algo.alg_base import Evaluator
  from src.common.constant import Config
  from singa import singa_wrap
  from singa import device
  from singa import tensor
  from singa import opt
  from singa import autograd
  from singa.opt import Optimizer
  from singa.opt import DecayScheduler
  from singa.opt import Constant
  import numpy
  import time
  import argparse
  from PIL import Image
  from numpy import linalg
  import torch
label_desc: Use image node_id 5 for calling a global function with example usage: resize_dataset(x, image_size) and returns: X