code: def scale_image(
      image: np.ndarray, scale: tuple = (0, 255)
  ) -> np.ndarray:
      """
      Scales an image in a specified range.
  
      Parameters
      ----------
      image
          Image to be scale.
      scale
          The scaling interval.
  
      Returns
      -------
      img_scaled
          Scaled image.
      """
  
      img_max, img_min = image.max(), image.min()
      img_std = (image - img_min) / (img_max - img_min)
      img_scaled = img_std * (scale[1] - scale[0]) + scale[0]
  
      return img_scaled
  
imports: import copy
  import logging
  from functools import partial
  from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
  import numpy
  from skimage.segmentation import felzenszwalb, quickshift, slic
  from alibi.api.defaults import DEFAULT_DATA_ANCHOR_IMG, DEFAULT_META_ANCHOR
  from alibi.api.interfaces import Explainer, Explanation
  from alibi.exceptions import PredictorCallError, PredictorReturnTypeError
  from alibi.utils.wrappers import ArgmaxTransformer
  from .anchor_base import AnchorBaseBeam
  from .anchor_explanation import AnchorExplanation
label_desc: Use image node_id 1 for calling a global function with example usage: scale_image(image, scale) and returns: img_scaled