code: def generate_random_mask(
      image_height: int, image_width: int, fraction=0.01
  ) -> np.ndarray:
      """Generates a random pixel mask.
  
      The result of this method can be used as the initial seed to generate
      a 'fully' blurred image with the help of the create_blurred_image(...)
      method.
  
      Args:
        image_height: the image height for which the mask should be generated.
        image_width: the image width for which the mask should be generated.
        fraction: the fraction of the mask pixels that should be set to true.
          The valid value range is [0.0, 1.0]. Set the value to 0.0 if no
          information from the original image should be used in the blurred image.
      Returns:
        The binary mask with the `fraction` of elements set to True.
      """
      mask = np.zeros(shape=[image_height, image_width], dtype=bool)
      size = mask.size
      indices = np.random.choice(
          size, replace=False, size=int(size * fraction)
      )
      mask[np.unravel_index(indices, mask.shape)] = True
      return mask
  
file_path: saliency/saliency/metrics/pic.py
imports: import io
  import numpy
  import os
  from PIL import Image
  from scipy import interpolate
  from typing import Callable, List, NamedTuple, Optional, Sequence, Tuple
label_desc: Use image node_id 2 for calling a global function with example usage: generate_random_mask(image_height, image_width, fraction) and returns: mask