code: def _extract_feature_item(
      feature: features_lib.FeaturesDict,
      expected_key: str,
      expected_value: features_lib.FeatureConnector,
      fn: Callable[..., Any],
  ) -> features_lib.FeatureConnector:
      """Calls `_extract_features(feature[key], expected_feature=value)`."""
      assert isinstance(feature, features_lib.FeaturesDict)
      if expected_key not in feature:
          raise ValueError(
              f"Missing expected feature {expected_key!r}."
          )
  
      with utils.try_reraise(f"In {expected_key!r}: "):
          return fn(
              feature=feature[expected_key],
              expected_feature=expected_value,
          )
  
file_path: datasets/tensorflow_datasets/core/decode/partial_decode.py
imports: import typing
  from typing import Any, Callable, Optional, Union
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.decode import base
  from tensorflow_datasets.core.features import features_dict
  from tensorflow_datasets.core.utils import dtype_utils
label_desc: Use image node_id 4 for calling a global function with example usage: _extract_feature_item(feature, expected_key, expected_value, fn) and returns: fn