code: def cutout_checkerboard(
      image: tf.Tensor,
      noise_magnitude: tf.Tensor,
      rng: int,
      denoise_configs: ml_collections.ConfigDict,
      dtype: tf.DType = tf.float32,
  ) -> Tuple[tf.Tensor, tf.Tensor]:
      """Randomly cuts out portions of the given image.
  
      Noise is sampled at `patch_size` times lower resolution and upsampled to
      form a checkerboard pattern.
  
      Args:
        image: A single image,must be in 0-1 range.
        noise_magnitude: Used to generate the cutout mask.
        rng: Seed for sampling the noise.
        denoise_configs: Configurations for the denoising process.
        dtype: Data type of the image.
  
      Returns:
        The corrupted image and the noise.
      """
      del rng
  
      p = 1 - noise_magnitude
      h, w, _ = image.shape
      fh, fw = denoise_configs.patch_size
      gh, gw = h // fh, w // fw
  
      noise = tf.random.uniform((gh, gw), dtype=dtype, seed=None)
      noise = tf.cast(noise > p, dtype=dtype)
      noise = tf.image.resize(
          noise[..., None], [h, w], method="nearest"
      )
  
      noised_image = image * noise + 0.5 * (1 - noise)
      return noised_image, 1 - noise
  
file_path: scenic/scenic/projects/robust_segvit/datasets/denoise_utils.py
imports: from typing import Tuple, Optional
  from absl import logging
  import ml_collections
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: cutout_checkerboard(image, noise_magnitude, rng, denoise_configs, dtype) and returns: noised_image,  unknown