code: def get_parser():
      parser = argparse.ArgumentParser(
          description="change specified attributes of a YAML file",
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
  
      egroup = parser.add_mutually_exclusive_group()
      parser.add_argument("inyaml", nargs="?")
      egroup.add_argument("-o", "--outyaml")
      egroup.add_argument("--outdir")
      parser.add_argument(
          "-a",
          "--arg",
          action="append",
          default=[],
          help="e.g -a a.b.c=4 -> {'a': {'b': {'c': 4}}}",
      )
      parser.add_argument(
          "-d",
          "--delete",
          action="append",
          default=[],
          help='e.g -d a -> "a" is removed from the input yaml',
      )
      return parser
  
imports: import argparse
  from pathlib import Path
  import yaml
label_desc: Use image node_id 1 for calling a global function with example usage: get_parser() and returns: parser