docstr: Overlay image with mask described by the mask features.
  
  Parameters
  ----------
  image
      Image to be explained.
  segments
      Superpixels.
  mask_features
      List with superpixels present in mask.
  scale
      Pixel scale for masked image.
  
  Returns
  -------
  masked_image
      Image overlaid with mask.
docstr_tok: ["Overlay","image","with","mask","described","by","the","mask","features",".","Parameters","--","--","--","--","--","image","Image","to","be","explained",".","segments","Superpixels",".","mask_features","List","with","superpixels","present","in","mask",".","scale","Pixel","scale","for","masked","image",".","Returns","--","--","--","-","masked_image","Image","overlaid","with","mask","."]
code: def overlay_mask(
      self,
      image: np.ndarray,
      segments: np.ndarray,
      mask_features: list,
      scale: tuple = (0, 255),
  ) -> np.ndarray:
      """
      Overlay image with mask described by the mask features.
  
      Parameters
      ----------
      image
          Image to be explained.
      segments
          Superpixels.
      mask_features
          List with superpixels present in mask.
      scale
          Pixel scale for masked image.
  
      Returns
      -------
      masked_image
          Image overlaid with mask.
      """
  
      mask = np.zeros(segments.shape)
      for f in mask_features:
          mask[segments == f] = 1
      image = scale_image(image, scale=scale)
      masked_image = (image * np.expand_dims(mask, 2)).astype(int)
  
      return masked_image
  
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 6 for calling the AnchorImage obj's underlying member method code with example usage: obj.overlay_mask(image, segments, mask_features, scale) and returns: masked_image