class_docstr: Given a COCO TFDS example, creates features with boxes.
  
  The processing in this class includes:
  1. Converting images from uint8 to float32 with range [0, 1.]. Note that TFDS
     already parses the serialized protos and decodes jpeg images into uint8.
  2. Renaming keys to modality names.
class_docstr_tok: ["Given","a","COCO","TFDS","example",",","creates","features","with","boxes",".","The","processing","in","this","class","includes",":","1",".","Converting","images","from","uint8","to","float32","with","range","[","0",",","1.","]",".","Note","that","TFDS","already","parses","the","serialized","protos","and","decodes","jpeg","images","into","uint8",".","2",".","Renaming","keys","to","modality","names","."]
code: def __call__(self, features: Features) -> Features:
      features = super().__call__(features)
      image_size = transforms.get_dynamic_size(features[self.image_key])
      boxes = features["objects"]["bbox"]  # float32, in range [0, 1].
      instance_labels = tf.cast(features["objects"]["label"], tf.int32)
  
      features_new = {
          self.image_key: features[self.image_key],
          self.boxes_key: boxes,
          self.instance_labels_key: instance_labels,
          self.area_key: features["objects"]["area"],
          self.orig_size_key: tf.cast(image_size, tf.int32),
          self.image_id_key: features["image/id"],
          self.annotation_id_key: features["objects"]["id"],
      }
  
      # We optionally fetch `is_crowd` as it is only present in Coco, and this
      # prevents breakage of inheritors e.g. LVIS, OpenImagesV5 and Coco Panoptic.
      if "is_crowd" in features["objects"]:
          features_new[self.crowd_key] = tf.cast(
              features["objects"]["is_crowd"], tf.int32
          )
  
          if self.remove_crowd_annotations:
              # Remove categories for which any instance is labeled as a crowd. These
              # categories violate the assumption that every instance of the category
              # is exhaustively annotated, which is made in some losses.
              crowd_labels = tf.boolean_mask(
                  instance_labels, features_new[self.crowd_key] == 1
              )
              not_exhaustively_annotated = tf.reduce_any(
                  instance_labels[..., None]
                  == crowd_labels[..., None, :],
                  axis=-1,
              )
              mask = tf.logical_not(not_exhaustively_annotated)
  
              instance_keys = [
                  self.boxes_key,
                  self.instance_labels_key,
                  self.area_key,
                  self.annotation_id_key,
                  self.crowd_key,
              ]
              for k in instance_keys:
                  features_new[k] = tf.boolean_mask(
                      features_new[k], mask
                  )
  
      if "rng" in features:
          features_new[SEED_KEY] = features["rng"]
  
      return features_new
  
imports: import abc
  import dataclasses
  from typing import Optional, Sequence, Tuple, Union
  from clu import preprocess_spec
  from scenic.projects.owl_vit.preprocessing import modalities
  from scenic.projects.owl_vit.preprocessing import transforms
  import tensorflow
label_desc: Use image node_id 1 for calling the DecodeCocoExample obj's underlying member method code with example usage: obj.__call__(features) and returns: features_new