class_docstr: Top-level `FeatureConnector` to manage decoding.
  
  Note that `FeatureConnector` which are declared as `TopLevelFeature` can be
  nested. However, only the top-level feature should be decoded.
  
  `TopLevelFeature` allows better control over the decoding, and
  eventually better support for augmentations.
class_docstr_tok: ["Top-level","`","FeatureConnector","`","to","manage","decoding",".","Note","that","`","FeatureConnector","`","which","are","declared","as","`","TopLevelFeature","`","can","be","nested",".","However",",","only","the","top-level","feature","should","be","decoded",".","`","TopLevelFeature","`","allows","better","control","over","the","decoding",",","and","eventually","better","support","for","augmentations","."]
docstr: Encodes nested data values into `tf.train.Example` bytes.
  
  See `deserialize_example` to decode the proto into `tf.Tensor`.
  
  Args:
    example_data: Example data to encode (numpy-like nested dict)
  
  Returns:
    The serialized `tf.train.Example`.
docstr_tok: ["Encodes","nested","data","values","into","`","tf.train.Example","`","bytes",".","See","`","deserialize_example","`","to","decode","the","proto","into","`","tf.Tensor","`",".","Args",":","example_data",":","Example","data","to","encode","(","numpy-like","nested","dict",")","Returns",":","The","serialized","`","tf.train.Example","`","."]
code: def serialize_example(self, example_data) -> bytes:
      """Encodes nested data values into `tf.train.Example` bytes.
  
      See `deserialize_example` to decode the proto into `tf.Tensor`.
  
      Args:
        example_data: Example data to encode (numpy-like nested dict)
  
      Returns:
        The serialized `tf.train.Example`.
      """
      example_data = self.encode_example(example_data)
      return self._example_serializer.serialize_example(example_data)
  
imports: from __future__ import annotations
  import enum
  import functools
  from typing import Any, List, Union
  from tensorflow_datasets.core import example_parser
  from tensorflow_datasets.core import example_serializer
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.features import feature
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 7 for calling the TopLevelFeature obj's underlying member method code with example usage: obj.serialize_example(example_data) and returns: self