def temp_output_file(prefix="tmp", suffix="", dir=None, make_parents=False, always_clean=False):
  """
  A context manager for convenience in creating a temporary file,
  which is deleted when exiting the context.

  Usage:
    with temp_output_file() as (fd, path):
      ...
  """
  return _temp_output(False, prefix=prefix, suffix=suffix, dir=dir, make_parents=make_parents,
                      always_clean=always_clean)
A context manager for convenience in creating a temporary file,
  which is deleted when exiting the context.

  Usage:
    with temp_output_file() as (fd, path):
      ...