code: def shape_and_dtype(t):
      """Return the shape and dtype for the default gradient for a Tensor."""
      if t.dtype == dtypes.resource:
          handle_data = (
              resource_variable_ops.get_eager_safe_handle_data(t)
          )
          if (
              handle_data is None
              or not handle_data.is_set
              or len(handle_data.shape_and_type) != 1
          ):
              raise ValueError(
                  "Internal error: Tried to take gradients (or similar) "
                  "of a variable without handle data:\n%s" % str(t)
              )
          shape_and_type = handle_data.shape_and_type[0]
          return (
              tensor_shape.TensorShape(shape_and_type.shape),
              dtypes.as_dtype(shape_and_type.dtype),
          )
      return t.shape, t.dtype
  
file_path: tensorflow/tensorflow/python/ops/default_gradient.py
imports: from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import resource_variable_ops
label_desc: Use image node_id 2 for calling a global function with example usage: shape_and_dtype(t) and returns: t,  t, tensor_shape,  dtypes