code: def write_AST(wdl_file, outdir=None):
      '''
      Writes a file with the AST for a wdl file in the outdir.
      '''
      if outdir is None:
          outdir = os.getcwd()
      with open(os.path.join(outdir, 'AST.out'), 'w') as f:
          with open(wdl_file, 'r') as wdl:
              wdl_string = wdl.read()
              ast = wdl_parser.parse(wdl_string).ast()
              f.write(ast.dumps(indent=2)f write_AST(wdl_file, outdir=None):
      '''
      Writes a file with the AST for a wdl file in the outdir.
      '''
      if outdir is None:
          outdir = os.getcwd()
      with open(os.path.join(outdir, 'AST.out'), 'w') as f:
          with open(wdl_file, 'r') as wdl:
              wdl_string = wdl.read()
              ast = wdl_parser.parse(wdl_string).ast()
              f.write(ast.dumps(indent=2))
docs: Writes a file with the AST for a wdl file in the outdir.