class_docstr: A weakly typed Tensor.
  
  A simple wrapper class that contains a normal Tensor.
  
  A "weak" type means that its dtype is temporarily inferred by the system,
  and could defer to other dtypes.
  
  i.g. weak f64 + f16 => f16
  
  This information is used for auto dtype conversion.
code: def _shape_as_list(self):
      if self.shape.ndims is not None:
          return [dim.value for dim in self.shape.dims]
      else:
          return None
  
imports: from typing import Optional
  import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import composite_tensor_gradient
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import extension_type
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_conversion_registry
  from tensorflow.python.types import core
label_desc: Use image node_id 8 for calling the WeakTensor obj's underlying member method code with example usage: obj._shape_as_list() and returns: unknown, None