Make a temporary file with `contents`.

    The file will be cleaned up on exit.

def _temp_filename(contents):
    """
    Make a temporary file with `contents`.

    The file will be cleaned up on exit.
    """
    fp = tempfile.NamedTemporaryFile(
        prefix='codequalitytmp', delete=False)
    name = fp.name
    fp.write(contents)
    fp.close()
    _files_to_cleanup.append(name)
    return name