class_docstr: To parse Examples.
class_docstr_tok: ["To","parse","Examples","."]
docstr: Deserialize a single `tf.train.Example` proto.
  
  Usage:
  ```
  ds = tf.data.TFRecordDataset(filepath)
  ds = ds.map(file_adapter.parse_example)
  ```
  
  Args:
    serialized_example: `tf.Tensor`, the `tf.string` tensor containing the
      serialized proto to decode.
  
  Returns:
    example: A nested `dict` of `tf.Tensor` values. The structure and tensors
      shape/dtype match the  `example_specs` provided at construction.
docstr_tok: ["Deserialize","a","single","`","tf.train.Example","`","proto",".","Usage",":","``","`","ds","=","tf.data.TFRecordDataset","(","filepath",")","ds","=","ds.map","(","file_adapter.parse_example",")","``","`","Args",":","serialized_example",":","`","tf.Tensor","`",",","the","`","tf.string","`","tensor","containing","the","serialized","proto","to","decode",".","Returns",":","example",":","A","nested","`","dict","`","of","`","tf.Tensor","`","values",".","The","structure","and","tensors","shape\/dtype","match","the","`","example_specs","`","provided","at","construction","."]
code: def parse_example(self, serialized_example):
      """Deserialize a single `tf.train.Example` proto.
  
      Usage:
      ```
      ds = tf.data.TFRecordDataset(filepath)
      ds = ds.map(file_adapter.parse_example)
      ```
  
      Args:
        serialized_example: `tf.Tensor`, the `tf.string` tensor containing the
          serialized proto to decode.
  
      Returns:
        example: A nested `dict` of `tf.Tensor` values. The structure and tensors
          shape/dtype match the  `example_specs` provided at construction.
      """
      # Because of RaggedTensor specs, feature_specs can be a 2-level nested dict,
      # so have to wrap `tf.io.parse_single_example` between
      # `flatten_nest_dict`/`pack_as_nest_dict`.
      # {
      #     'video/image': tf.io.FixedLenSequenceFeature(...),
      #     'video/object/bbox': {
      #         'ragged_flat_values': tf.io.FixedLenSequenceFeature(...),
      #         'ragged_row_lengths_0', tf.io.FixedLenSequenceFeature(...),
      #     },
      # }
      example = tf.io.parse_single_example(
          serialized=serialized_example,
          features=self.flat_feature_specs,
      )
      example = utils.pack_as_nest_dict(
          example, self._nested_feature_specs
      )
  
      example = {  # pylint:disable=g-complex-comprehension
          k: _deserialize_single_field(example_data, tensor_info)
          for k, (example_data, tensor_info) in utils.zip_dict(
              example, self._flat_example_specs
          )
      }
      # Reconstruct all nesting
      example = utils.pack_as_nest_dict(example, self._example_specs)
      return example
  
imports: from __future__ import annotations
  import abc
  from collections.abc import Iterable, Mapping, Sequence
  import dataclasses
  import re
  from typing import Any, Union
  import numpy
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.features import feature
  from tensorflow_datasets.core.utils import dtype_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  from tensorflow_datasets.proto import tf_example_pb2
  from tensorflow_datasets.proto import tf_feature_pb2
label_desc: Use image node_id 2 for calling the ExampleParser obj's underlying member method code with example usage: obj.parse_example(serialized_example) and returns: example