code: def normalize_cv2(img, mean, denominator):
      if mean.shape and len(mean) != 4 and mean.shape != img.shape:
          mean = np.array(
              mean.tolist() + [0] * (4 - len(mean)), dtype=np.float64
          )
      if not denominator.shape:
          denominator = np.array(
              [denominator.tolist()] * 4, dtype=np.float64
          )
      elif len(denominator) != 4 and denominator.shape != img.shape:
          denominator = np.array(
              denominator.tolist() + [1] * (4 - len(denominator)),
              dtype=np.float64,
          )
  
      img = np.ascontiguousarray(img.astype("float32"))
      cv2.subtract(img, mean.astype(np.float64), img)
      cv2.multiply(img, denominator.astype(np.float64), img)
      return img
  
imports: from __future__ import division
  from typing import Optional, Sequence, Union
  from warnings import warn
  import cv2
  import numpy
  import skimage
  from albumentations import random_utils
  from albumentations.augmentations.utils import MAX_VALUES_BY_DTYPE, _maybe_process_in_chunks, clip, clipped, ensure_contiguous, is_grayscale_image, is_rgb_image, non_rgb_warning, preserve_channel_dim, preserve_shape
label_desc: Use image node_id 1 for calling a global function with example usage: normalize_cv2(img, mean, denominator) and returns: img