class_docstr: Normalize an image.
  
  Args:
      mean (list, optional): The mean value of a data set. Default: [0.5, 0.5, 0.5].
      std (list, optional): The standard deviation of a data set. Default: [0.5, 0.5, 0.5].
  
  Raises:
      ValueError: When mean/std is not list or any value in std is 0.
class_docstr_tok: ["Normalize","an","image",".","Args",":","mean","(","list",",","optional",")",":","The","mean","value","of","a","data","set",".","Default",":","[","0.5",",","0.5",",","0.5","]",".","std","(","list",",","optional",")",":","The","standard","deviation","of","a","data","set",".","Default",":","[","0.5",",","0.5",",","0.5","]",".","Raises",":","ValueError",":","When","mean\/std","is","not","list","or","any","value","in","std","is","0","."]
code: def __call__(self, data: dict) -> dict:
      mean = np.array(self.mean)[np.newaxis, np.newaxis, :]
      std = np.array(self.std)[np.newaxis, np.newaxis, :]
      data["img"] = functional.normalize(data["img"], mean, std)
      if "fg" in data.get("gt_fields", []):
          data["fg"] = functional.normalize(data["fg"], mean, std)
      if "bg" in data.get("gt_fields", []):
          data["bg"] = functional.normalize(data["bg"], mean, std)
  
      return data
  
imports: import random
  import base64
  from typing import Callable, Union, List, Tuple
  import cv2
  import numpy
  import paddle
  import paddle.nn.functional
  from paddleseg.transforms import functional
  from PIL import Image
label_desc: Use image node_id 2 for calling the Normalize obj's underlying member method code with example usage: obj.__call__(data) and returns: data