class_docstr: Test item of a FeatureExpectation.
  
  Should be passed to `assertFeature` method of `FeatureExpectationsTestCase`.
  
  Each `FeatureExpectationItem` test an example serialization/deserialization (
  `feature.encode_example` -> `example_serializer.serialize_example` ->
  `example_parse.parse_example` -> `feature.decode_example`).
  
  Attributes:
    value: Input to `features.encode_example`
    expected: Expected output after `features.decode_example`
    expected_np: Expected output after `features.decode_example_np`
    expected_serialized: Optional
    decoders: Optional `tfds.decode.Decoder` objects (to overwrite the default
      `features.decode_example`). See
      https://www.tensorflow.org/datasets/decode.
    dtype: If `decoders` is provided, the output of `decode_example` is checked
      against this value (otherwise, output is checked against `features.dtype`)
    shape: If `decoders` is provided, the output of `decode_example` is checked
      against this value (otherwise, output is checked against `features.shape`)
    raise_cls: Expected error raised during `features.encode_example`. When set
      `expected` and `expected_serialized` should be `None`.
    raise_cls_np: Expected error raised during `features.encode_example_np`.
      When set `expected_np` and `expected_serialized_np` should be `None`.
    raise_msg: Expected error message regex.
    atol: If provided, compare float values with this precision (use default
      otherwise).
code: def __post_init__(self):
      if not self.decoders and (
          self.dtype is not None or self.shape is not None
      ):
          raise ValueError(
              "dtype and shape should only be set with transform"
          )
  
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 1 for calling the FeatureExpectationItem obj's underlying member method code with example usage: obj.__post_init__() without return types