code: def testFromValue(
      self,
      initial_value=None,
      shape=None,
      dtype=dtypes.float32,
      trainable=True,
  ):
      var = resource_variable_ops.ResourceVariable(
          initial_value=initial_value,
          shape=shape,
          dtype=dtype,
          trainable=trainable,
      )
      spec = resource_variable_ops.VariableSpec.from_value(var)
      self.assertEqual(spec.shape, shape)
      self.assertEqual(spec.dtype, dtype)
      self.assertEqual(spec.trainable, trainable)
      self.assertIsNone(spec.alias_id)
  
imports: from absl.testing import parameterized
  import numpy
  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_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.platform import test
  from tensorflow.python.util import nest
label_desc: Use image node_id 3 for calling the VariableSpecTest obj's underlying member method code with example usage: obj.testFromValue(initial_value, shape, dtype, trainable) without return types