def METHOD_NAME(fn):
  """Function wrapper that ensures the function's output is used.
  If the output is not used, a `tf.compat.v1.logging.fatal` error is raised.
  An output is marked as used if any of its attributes are read, modified, or
  updated.  Examples when the output is a `Tensor` include:
  - Using it in any capacity (e.g. `y = t + 0`, `sess.run(t)`)
  - Accessing a property (e.g. getting `t.name` or `t.op`).
  Note, certain behaviors cannot be tracked - for these the object may not
  be marked as used.  Examples include:
  - `t != 0`.  In this case, comparison is done on types / ids.
  - `isinstance(t, tf.Tensor)`.  Similar to above.
  Args:
    fn: The function to wrap.
  Returns:
    The wrapped function.
  """
  def wrapped(*args, **kwargs):
    return _add_should_use_warning(fn(*args, **kwargs), fatal_error=True)
  return tf_decorator.make_decorator(
      fn, wrapped, 'must_use_result_or_fatal',
      ((fn.__doc__ or '') +
       ('\n\n  '
        '**NOTE** The output of this function must be used.  If it is not, '
        'a fatal error will be raised.  To mark the output as used, '
        'call its .mark_used() method.')))