code: def get_depth_tensor(pad_mode):
      global depth_channel_tensor
  
      if depth_channel_tensor is not None:
          return depth_channel_tensor
  
      depth_tensor = None
  
      if pad_mode == "resize":
          depth_tensor = np.zeros((H, W))
          for row, const in enumerate(np.linspace(0, 1, H)):
              depth_tensor[row, :] = const
      else:
          depth_tensor = np.zeros((ORIG_H, ORIG_W))
          for row, const in enumerate(np.linspace(0, 1, ORIG_H)):
              depth_tensor[row, :] = const
          depth_tensor = np.pad(
              depth_tensor, (14, 14), mode=pad_mode
          )  # edge or reflect
          depth_tensor = depth_tensor[:H, :W]
  
      depth_channel_tensor = torch.Tensor(depth_tensor)
      return depth_channel_tensor
  
imports: import os, cv2, glob
  import numpy
  from PIL import Image
  import torch
  import torch.utils.data
  from torchvision import datasets, models, transforms
  from utils import read_masks, get_test_meta, get_nfold_split
  import augmentation
  from settings import *
label_desc: Use image node_id 8 for calling a global function with example usage: get_depth_tensor(pad_mode) and returns: depth_channel_tensor, depth_channel_tensor