code: def normalize_img_and_label(
      image,
      label,
      image_size,
      width_ratio=1,
      num_classes=None,
      one_hot=False,
  ):
      """Normalizes the image and label according to the params specified."""
      if one_hot:
          label = tf.one_hot(label, num_classes, dtype=tf.dtypes.int8)
      image = tf.image.resize_with_pad(
          image, image_size, int(image_size * width_ratio)
      )
      return image, label
  
imports: import os
  import pickle
  from typing import Any, Dict, Optional
  import uuid
  from ..None import machine_config
  from ..None import run
  import tensorflow
  import tensorflow_datasets
  from official.legacy.image_classification.efficientnet import efficientnet_model
  from official.legacy.image_classification.resnet import resnet_model
label_desc: Use image node_id 9 for calling a global function with example usage: normalize_img_and_label(image, label, image_size, width_ratio, num_classes, one_hot) and returns: image,  label