class_docstr: Implements the TF backend ops for a PC auto-batching VM.
docstr: Returns the `instructions.Type` of `t`.
  
  Args:
    t: `tf.Tensor` or a Python or numpy constant.
    dtype_hint: dtype to prefer, if `t` is a constant.
  
  Returns:
    vm_type: `instructions.TensorType` describing `t`.
docstr_tok: ["Returns","the","`","instructions.Type","`","of","`","t","`",".","Args",":","t",":","`","tf.Tensor","`","or","a","Python","or","numpy","constant",".","dtype_hint",":","dtype","to","prefer",",","if","`","t","`","is","a","constant",".","Returns",":","vm_type",":","`","instructions.TensorType","`","describing","`","t","`","."]
code: def type_of(self, t, dtype_hint=None):
      """Returns the `instructions.Type` of `t`.
  
      Args:
        t: `tf.Tensor` or a Python or numpy constant.
        dtype_hint: dtype to prefer, if `t` is a constant.
  
      Returns:
        vm_type: `instructions.TensorType` describing `t`.
      """
      if tf.executing_eagerly():
          new_t = tf.convert_to_tensor(value=t, dtype=dtype_hint)
      else:
          with tf.Graph().as_default():  # Use a scratch graph.
              new_t = tf.convert_to_tensor(value=t, dtype=dtype_hint)
      dtype = new_t.dtype.base_dtype.as_numpy_dtype
      shape = (
          None
          if new_t.shape.ndims is None
          else tuple(new_t.shape.as_list())
      )
      return instructions.TensorType(dtype, shape)
  
imports: import collections
  import contextlib
  import six
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.auto_batching import instructions
  from tensorflow_probability.python.experimental.auto_batching import xla
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow.python.ops import control_flow_util
label_desc: Use image node_id 3 for calling the TensorFlowBackend obj's underlying member method code with example usage: obj.type_of(t, dtype_hint) and returns: instructions