code: def testFromSpec(self):
      example_array_spec = example_nested_array_spec(np.int32)
      example_tensor_spec = tensor_spec.from_spec(example_array_spec)
  
      flat_tensor_spec = tf.nest.flatten(example_tensor_spec)
      expected_tensor_spec = tf.nest.flatten(
          example_nested_tensor_spec(tf.int32)
      )
  
      for spec, expected_spec in zip(
          flat_tensor_spec, expected_tensor_spec
      ):
          self.assertEqual(type(expected_spec), type(spec))
          self.assertEqual(expected_spec, spec)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.specs import array_spec
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
label_desc: Use image node_id 1 for calling the FromSpecTest obj's underlying member method code with example usage: obj.testFromSpec() without return types