code: def __init__(
      self,
      config: "PretrainedConfig",
      preprocessor: "BaseImageProcessor",
      preprocessor_kwargs: Optional[Dict[str, Any]] = None,
  ):
      super().__init__(
          config, preprocessor, preprocessor_kwargs=preprocessor_kwargs
      )
      size = None
      for dict_keys in VALID_SIZE_DICT_KEYS:
          try:
              size = tuple(
                  self.preprocessor.size[key] for key in dict_keys
              )
          except KeyError:
              pass
      if size is None:
          raise ValueError(
              f"Could not retrieve the size information from {preprocessor}"
          )
  
      self.transforms = Compose(
          [
              Resize(size),
              CenterCrop(size),
              ToTensor(),
              Normalize(
                  mean=self.preprocessor.image_mean,
                  std=self.preprocessor.image_std,
              ),
          ]
      )
  
file_path: optimum/optimum/utils/preprocessing/image_classification.py
imports: from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
  import torch
  from torchvision.transforms import CenterCrop, Compose, Normalize, Resize, ToTensor
  from transformers.image_processing_utils import VALID_SIZE_DICT_KEYS, BaseImageProcessor
  from ..None import logging
  from .base import TaskProcessor
label_desc: Use image node_id 1 to create a new ImageClassificationProcessing object from inherited base classes: TaskProcessor with example: obj = ImageClassificationProcessing(config, preprocessor, preprocessor_kwargs)