code: def poster_mask_uint8(magnitude):
      # expects [0..8] where 8 yields identity mask and a 0
      # would be a mask that zeros all bits,
      # however, following the implementation for AA and RA referred
      # in the paper https://arxiv.org/pdf/1909.13719.pdf, we remap 0 to 1,
      # to avoid completely blank images
      magnitude = np.round(magnitude).astype(np.uint32)
      if magnitude <= 0:
          magnitude = 1
      elif magnitude > 8:
          magnitude = 8
      nbits = np.round(8 - magnitude).astype(np.uint32)
      removal_mask = np.uint8(2) ** nbits - 1
      return np.array(np.uint8(255) ^ removal_mask, dtype=np.uint8)
  
imports: from nvidia.dali import fn
  from nvidia.dali import types
  from nvidia.dali.auto_aug.core import augmentation
label_desc: Use image node_id 17 for calling a global function with example usage: poster_mask_uint8(magnitude) and returns: np