def save_tikz(commands, path=None, baseline=0, options=None):
    """
    Save a list of tikz commands.
    """
    options = ('baseline=(O.base)' if options is None else 
        'baseline=(O.base), ' + options)
    begin = ['\\begin{{tikzpicture}}[{}]\n'.format(options),
        '\\node (O) at (0, {}) {{}};\n'.format(baseline)]
    end = ['\\end{tikzpicture}\n']
    with open(path, 'w+') as file:
        file.writelines(begin + commands + end)
