class_docstr: Composite `FeatureConnector`; each feature in `dict` has its own connector.
  
  The encode/decode method of the spec feature will recursively encode/decode
  every sub-connector given on the constructor.
  Other features can inherit from this class and call super() in order to get
  nested container.
  
  Example:
  
  For DatasetInfo:
  
  ```
  features = tfds.features.FeaturesDict({
      'input': tfds.features.Image(),
      'output': np.int32,
  })
  ```
  
  At generation time:
  
  ```
  for image, label in generate_examples:
    yield {
        'input': image,
        'output': label
    }
  ```
  
  At tf.data.Dataset() time:
  
  ```
  for example in tfds.load(...):
    tf_input = example['input']
    tf_output = example['output']
  ```
  
  For nested features, the FeaturesDict will internally flatten the keys for the
  features and the conversion to tf.train.Example. Indeed, the tf.train.Example
  proto do not support nested features while tf.data.Dataset does.
  But internal transformation should be invisible to the user.
  
  Example:
  
  ```
  tfds.features.FeaturesDict({
      'input': np.int32,
      'target': {
          'height': np.int32,
          'width': np.int32,
      },
  })
  ```
  
  Will internally store the data as:
  
  ```
  {
      'input': tf.io.FixedLenFeature(shape=(), dtype=tf.int32),
      'target/height': tf.io.FixedLenFeature(shape=(), dtype=tf.int32),
      'target/width': tf.io.FixedLenFeature(shape=(), dtype=tf.int32),
  }
  ```
docstr: See base class for details.
docstr_tok: ["See","base","class","for","details","."]
code: def encode_example(self, example_dict):
      """See base class for details."""
      example = {}
      for k, (feature, example_value) in utils.zip_dict(
          self._feature_dict, example_dict
      ):
          try:
              example[k] = feature.encode_example(example_value)
          except Exception as e:  # pylint: disable=broad-except
              utils.reraise(
                  e,
                  prefix=f'In <{feature.__class__.__name__}> with name "{k}":\n',
              )
      return example
  
imports: from __future__ import annotations
  import concurrent.futures
  from typing import Dict, List, Union
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.features import feature
  from tensorflow_datasets.core.features import tensor_feature
  from tensorflow_datasets.core.features import top_level_feature
  from tensorflow_datasets.core.proto import feature_pb2
  from tensorflow_datasets.core.utils import dtype_utils
  from tensorflow_datasets.core.utils import py_utils
  from tensorflow_datasets.core.utils import type_utils
label_desc: Use image node_id 15 for calling the FeaturesDict obj's underlying member method code with example usage: obj.encode_example(example_dict) and returns: example