code: def output_markdown(markdown_cont, output_file):
      
      if output_file:
          with open(output_file, 'w') as out:
              out.write(markdown_cont)
docs: Writes to an output file if `outfile` is a valid path.