class_docstr: Wrapper for the numerics-checking callback for thread locality.
class_docstr_tok: ["Wrapper","for","the","numerics-checking","callback","for","thread","locality","."]
docstr: Determine what tensor to output from callback.
  
  Args:
    op_type: Type of the op that outputs the original symbolic tensor, as
      `bytes`.
    tensor: The original output symbolic tensor.
    checked_tensor: The debugger-instrumented, numerics-checking tensor.
    is_v1_graph_mode: Whether the debugged proggram is running under V1 graph
      mode.
  
  Returns:
    A symbolic tensor to be returned by the dumping op_callback.
docstr_tok: ["Determine","what","tensor","to","output","from","callback",".","Args",":","op_type",":","Type","of","the","op","that","outputs","the","original","symbolic","tensor",",","as","`","bytes","`",".","tensor",":","The","original","output","symbolic","tensor",".","checked_tensor",":","The","debugger-instrumented",",","numerics-checking","tensor",".","is_v1_graph_mode",":","Whether","the","debugged","proggram","is","running","under","V1","graph","mode",".","Returns",":","A","symbolic","tensor","to","be","returned","by","the","dumping","op_callback","."]
code: def _get_output_tensor(
      self, op_type, tensor, checked_tensor, is_v1_graph_mode
  ):
      """Determine what tensor to output from callback.
  
      Args:
        op_type: Type of the op that outputs the original symbolic tensor, as
          `bytes`.
        tensor: The original output symbolic tensor.
        checked_tensor: The debugger-instrumented, numerics-checking tensor.
        is_v1_graph_mode: Whether the debugged proggram is running under V1 graph
          mode.
  
      Returns:
        A symbolic tensor to be returned by the dumping op_callback.
      """
      if is_v1_graph_mode:
          # Placeholders need special treatment under V1 graph mode. The
          # callback can't simply override the Placeholder tensor to the debug
          # tensor, as that would cause the Placeholder op to lack a value.
          # The debug tensor is remembered and will be attached as control
          # inputs to ops that consumer the Placeholders later.
          if op_type == b"Placeholder":
              self._placeholder_to_debug_tensor[tensor] = checked_tensor
              return tensor
          else:
              return checked_tensor
      else:
          # Under non-v1 graph mode, rely on auto control dependency to run the
          # checked tensor.
          return tensor
  
imports: import collections
  import threading
  import numpy
  from tensorflow.core.protobuf import debug_event_pb2
  from tensorflow.python.debug.lib import op_callbacks_common
  from tensorflow.python.debug.lib import source_utils
  from tensorflow.python.eager import monitoring
  from tensorflow.python.framework import op_callbacks
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_debug_ops
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import compat
  from tensorflow.python.util import object_identity
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 3 for calling the CheckNumericsCallback obj's underlying member method code with example usage: obj._get_output_tensor(op_type, tensor, checked_tensor, is_v1_graph_mode) and returns: tensor, tensor, checked_tensor