code: def from_tensor(cls, tensor, name=None):
      tensor = _convert_to_tensor(tensor)
      return cls(tensor.shape, tensor.dtype, name)
  
imports: from tensorflow_probability.python.internal.backend.numpy.ops import _convert_to_tensor
label_desc: Use image node_id 1 for calling the TensorSpec obj's underlying member method code with example usage: obj.from_tensor(cls, tensor, name) and returns: cls