def METHOD_NAME(x, fatal_error=False):
  """Wraps object x so that if it is never used, a warning is logged.
  Args:
    x: Python object.
    fatal_error: Python bool.  If `True`, tf.compat.v1.logging.fatal is raised
      if the returned value is never used.
  Returns:
    An instance of `TFShouldUseWarningWrapper` which subclasses `type(x)`
    and is a very shallow wrapper for `x` which logs access into `x`.
  """
  if x is None or x == []:  # pylint: disable=g-explicit-bool-comparison
    return x
  # Extract the current frame for later use by traceback printing.
  try:
    raise ValueError()
  except ValueError:
    stack_frame = sys.exc_info()[2].tb_frame.f_back
  tf_should_use_helper = _TFShouldUseHelper(
      type_=type(x),
      repr_=repr(x),
      stack_frame=stack_frame,
      fatal_error_if_unsated=fatal_error)
  return _get_wrapper(x, tf_should_use_helper)