def dump_to_file(*output: str) ->str:
    """Dump `output` to a temporary file. Return path to the file."""
    import tempfile
    with tempfile.NamedTemporaryFile(mode='w', prefix='blk_', suffix='.log',
        delete=False, encoding='utf8') as f:
        for lines in output:
            f.write(lines)
            if lines and lines[-1] != '\n':
                f.write('\n')
    return f.name
