class_docstr: Tests FeatureExpectations with full encode-decode.
docstr: Test the given feature against the predicates.
docstr_tok: ["Test","the","given","feature","against","the","predicates","."]
code: def assertFeatureEagerOnly(
      self,
      feature,
      shape,
      dtype,
      tests,
      serialized_info=None,
      test_tensor_spec=True,
      skip_feature_tests=False,
      test_attributes=None,
  ):
      """Test the given feature against the predicates."""
      # Fill kwargs
      run_tests = functools.partial(
          self._run_tests,
          shape=shape,
          dtype=dtype,
          tests=tests,
          test_tensor_spec=test_tensor_spec,
      )
      assert_feature = functools.partial(
          self._assert_feature,
          shape=shape,
          dtype=dtype,
          tests=tests,
          serialized_info=serialized_info,
          test_tensor_spec=test_tensor_spec,
          skip_feature_tests=skip_feature_tests,
          test_attributes=test_attributes,
      )
  
      # Create the feature dict
      fdict = features.FeaturesDict({"inner": feature})
  
      # Check whether the following doesn't raise an exception
      fdict.catalog_documentation()
  
      with self._subTest("feature"):
          assert_feature(feature=feature)
          run_tests(
              serialize_fdict=fdict,
              deserialize_fdict=fdict,
              feature=feature,
          )
  
      # Test the feature again to make sure it behave correctly after restoring
      # TODO(tfds): Remove `skip_feature_tests` after text encoders are removed
      if not skip_feature_tests:
          # Restored from config
          with test_utils.tmp_dir() as config_dir:
              feature.save_config(config_dir)
              new_feature = feature.from_config(config_dir)
          assert_feature(feature=new_feature)
          with self._subTest("feature_roundtrip"):
              run_tests(
                  serialize_fdict=fdict,
                  deserialize_fdict=fdict,
                  feature=new_feature,
              )
  
          # Restored from proto
          with test_utils.tmp_dir() as config_dir:
              feature_proto = feature.to_proto()
              feature.save_metadata(config_dir, feature_name=None)
              new_feature = feature_lib.FeatureConnector.from_proto(
                  feature_proto
              )
              new_feature.load_metadata(config_dir, feature_name=None)
          assert_feature(feature=new_feature)
          new_fdict = features.FeaturesDict({"inner": new_feature})
          with self._subTest("feature_proto_roundtrip"):
              run_tests(
                  serialize_fdict=fdict,
                  deserialize_fdict=fdict,
                  feature=new_feature,
              )
          with self._subTest("serialize_fdict"):
              run_tests(
                  serialize_fdict=new_fdict,
                  deserialize_fdict=fdict,
                  feature=new_feature,
              )
          with self._subTest("deserialize_fdict"):
              run_tests(
                  serialize_fdict=fdict,
                  deserialize_fdict=new_fdict,
                  feature=new_feature,
              )
  
imports: import contextlib
  import dataclasses
  import functools
  from typing import Any, Optional, Type
  import dill
  from etils import enp
  import numpy
  from tensorflow_datasets.core import dataset_utils
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.data_sources import python
  from tensorflow_datasets.core.features import feature
  from tensorflow_datasets.core.utils import tree_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  from tensorflow_datasets.testing import test_case
  from tensorflow_datasets.testing import test_utils
label_desc: Use image node_id 2 for calling the FeatureExpectationsTestCase obj's underlying member method code with example usage: obj.assertFeatureEagerOnly(feature, shape, dtype, tests, serialized_info, test_tensor_spec, skip_feature_tests, test_attributes) without return types