def output_markdown(markdown_cont, output_file):
    if output_file:
        with open(output_file, 'w') as out:
            out.write(markdown_cont)
Writes to an output file if `outfile` is a valid path.
dataset/ETHPy150Open phodal/awesome-iot/toc.py/output_markdown