code: def _build_feature_specs(flat_example_specs):
      """Returns the `tf.train.Example` feature specification.
  
      Args:
        flat_example_specs: flattened example specs.
  
      Returns:
        The `dict` of `tf.io.FixedLenFeature`, `tf.io.VarLenFeature`, ...
      """
  
      # Convert individual fields into tf.train.Example compatible format
      def build_single_spec(k, v):
          with utils.try_reraise(
              f"Specification error for feature {k!r} ({v}): "
          ):
              return _to_tf_example_spec(v)
  
      return {
          k: build_single_spec(k, v)
          for k, v in flat_example_specs.items()
      }
  
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 8 for calling a global function with example usage: _build_feature_specs(flat_example_specs) and returns: unknown, _to_tf_example_spec