code: def _normalize_image(im, value_range, resize_shape=None):
      """Normalize an image by resizing it and rescaling its values.
  
      Args:
          im: Input image.
          value_range: [min_value, max_value]
          resize_shape: New image shape. Defaults to None.
  
      Returns:
          Resized and rescaled image.
      """
      im_max = np.max(im)
      im_min = np.min(im)
      im = (im - im_min) / (im_max - im_min)
      im = im * (value_range[1] - value_range[0]) + value_range[0]
      if resize_shape is not None:
          im = resize(
              im,
              resize_shape,
              order=3,
              mode="constant",
              preserve_range=True,
              anti_aliasing=True,
          )
      return im
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  from .base import CoreSaliency
  from .integrated_gradients import IntegratedGradients
  import numpy
  from skimage import segmentation
  from skimage.morphology import dilation
  from skimage.morphology import disk
  from skimage.transform import resize
label_desc: Use image node_id 1 for calling a global function with example usage: _normalize_image(im, value_range, resize_shape) and returns: im