code: def __nii2tensorarray__(self, data):
      [z, y, x] = data.shape
      new_data = np.reshape(data, [1, z, y, x])
      new_data = new_data.astype("float32")
  
      return new_data
  
file_path: MedicalNet/datasets/brains18.py
imports: import math
  import os
  import random
  import numpy
  from torch.utils.data import Dataset
  import nibabel
  from scipy import ndimage
label_desc: Use image node_id 2 for calling the BrainS18Dataset obj's underlying member method code with example usage: obj.__nii2tensorarray__(data) and returns: new_data