docs: def scratch_file(unlink=True, **kwargs):
      """Create a temporary file and return its name.
  
      Additional arguments are passed to :class:`tempfile.NamedTemporaryFile`
  
      At the start of the with block a secure, temporary file is created
      and its name returned.  At the end of the with block it is
      deleted.
      """
      kwargs['delete'] = False
      tf = tempfile.NamedTemporaryFile(**kwargs)
      tf.close()
      try:
          yield tf.name
      finally:
          if unlink:
              os.unlink(tf.name)