class_docstr: Dataset for images that provide some often used methods
docstr: Args:
          images: numpy 4D array
          normalization_type: `str`, available choices:
                  - divide_255
                  - divide_256
                  - by_channels
          meanstd
docstr_tok: ["Args",":","images",":","numpy","4D","array","normalization_type",":","`","str","`",",","available","choices",":","-","divide_255","-","divide_256","-","by_channels","meanstd"]
code: def normalize_images(images, normalization_type, meanstd=None):
      """
      Args:
              images: numpy 4D array
              normalization_type: `str`, available choices:
                      - divide_255
                      - divide_256
                      - by_channels
              meanstd
      """
      if normalization_type is not None:
          if normalization_type == "divide_255":
              images = images / 255
          elif normalization_type == "divide_256":
              images = images / 256
          elif normalization_type == "by_channels":
              images = images.astype("float64")
              # for every channel in image(assume this is last dimension)
              means, stds = meanstd
              for i in range(images.shape[-1]):
                  images[:, :, :, i] = (
                      images[:, :, :, i] - means[i]
                  ) / stds[i]
          else:
              raise Exception("Unknown type of normalization")
      return images
  
file_path: auptimizer/src/aup/Proposer/eas/data_providers/base_provider.py
imports: import numpy
label_desc: Use image node_id 3 for calling the ImagesDataSet obj's underlying member method code with example usage: obj.normalize_images(images, normalization_type, meanstd) and returns: images