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.
class_docstr_tok: ["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 _disallow(self, task):
      raise errors.OperatorNotAllowedInGraphError(
          f"{task} is not allowed. You can attempt the following resolutions to"
          " the problem: If you are running in Graph mode, use Eager execution"
          " mode or decorate this function with @tf.function. If you are using"
          " AutoGraph, you can try decorating this function with @tf.function."
          " If that does not work, then you may be using an unsupported feature"
          " or your source code may not be visible to AutoGraph. See"
          " https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/autograph/g3doc/reference/limitations.md#access-to-source-code"
          " for more information."
      )
  
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 6 for calling the WeakTensor obj's underlying member method code with example usage: obj._disallow(task) without return types