code: def test_serialize_deserialize(self, dtype):
      spec = example_nested_spec(dtype)
      serializer = example_encoding.get_example_serializer(spec)
      decoder = example_encoding.get_example_decoder(spec)
  
      sample = array_spec.sample_spec_nest(
          spec, np.random.RandomState(0)
      )
      example_proto = serializer(sample)
  
      recovered = self.evaluate(decoder(example_proto))
      tf.nest.map_structure(
          np.testing.assert_almost_equal, sample, recovered
      )
  
file_path: agents/tf_agents/utils/example_encoding_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import gin
  import numpy
  import tensorflow
  from tf_agents.specs import array_spec
  from tf_agents.utils import common
  from tf_agents.utils import example_encoding
label_desc: Use image node_id 1 for calling the NestExampleEncodeUtilsTest obj's underlying member method code with example usage: obj.test_serialize_deserialize(dtype) without return types