code: def testTypeSpecFromValue(self):
      g = ops.Graph()
      with g.as_default():
          v1 = np.array([1, 2, 3], np.int32)
          t1 = constant_op.constant(v1)
  
          ops_before = g.get_operations()
  
          expected = tensor.TensorSpec([3], dtypes.int32)
          self.assertEqual(expected, type_spec.type_spec_from_value(v1))
          self.assertEqual(expected, type_spec.type_spec_from_value(t1))
  
          # Check that creating TypeSpecs did not require building new Tensors.
          self.assertLen(g.get_operations(), len(ops_before))
  
imports: import pickle
  from absl.testing import parameterized
  import numpy
  from tensorflow.core.framework import full_type_pb2
  from tensorflow.core.function import trace_type
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework import type_spec
  from tensorflow.python.framework.type_utils import fulltypes_for_flat_tensors
  from tensorflow.python.ops import array_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 14 for calling the TensorSpecTest obj's underlying member method code with example usage: obj.testTypeSpecFromValue() without return types