code: def __init__(self, cfg):
      self.aug = ResizeShortestEdge(
          [cfg.INPUT.MIN_SIZE_TEST, cfg.INPUT.MIN_SIZE_TEST],
          cfg.INPUT.MAX_SIZE_TEST,
      )
      self.input_format = cfg.INPUT.FORMAT
      self.size_divisibility = cfg.SIZE_DIVISIBILITY
      self.pad_value = cfg.PAD_VALUE
      self.max_image_size = cfg.INPUT.MAX_SIZE_TEST
      self.device = cfg.MODEL.DEVICE
      self.pixel_std = (
          torch.tensor(cfg.MODEL.PIXEL_STD)
          .to(self.device)
          .view(len(cfg.MODEL.PIXEL_STD), 1, 1)
      )
      self.pixel_mean = (
          torch.tensor(cfg.MODEL.PIXEL_MEAN)
          .to(self.device)
          .view(len(cfg.MODEL.PIXEL_STD), 1, 1)
      )
      self.normalizer = lambda x: (x - self.pixel_mean) / self.pixel_std
  
file_path: transformers/examples/research_projects/lxmert/processing_image.py
imports: import sys
  from typing import Tuple
  import numpy
  import torch
  from PIL import Image
  from torch import nn
  from transformers.image_utils import PILImageResampling
  from utils import img_tensorize
label_desc: Use image node_id 1 to create a new Preprocess object  with example: obj = Preprocess(cfg)