import tempfile


def write_temp_return_filename(data):
    """
    Write out data to a temporary file and return that file's name.
    This file will need to be deleted.
    :param data: str: data to be written to a file
    :return: str: temp filename we just created
    """
    file = tempfile.NamedTemporaryFile(delete=False)
    file.write(data.encode('utf-8'))
    file.close()
    return file.name