code: def _patch_argparse(output_path):
      handle_parse = lambda parse_args, *_args, **_kw: _write_flags(
          parse_args, output_path
      )
      # parse_known_args is called by parse_args, so this handles both
      # cases.
      python_util.listen_method(
          argparse.ArgumentParser, "parse_known_args", handle_parse
      )
  
imports: import argparse
  import json
  import logging
  import sys
  from guild import entry_point_util
  from guild import flag_util
  from guild import log
  from guild import python_util
  from guild import util
label_desc: Use image node_id 3 for calling a global function with example usage: _patch_argparse(output_path) without return types