code: def get_parser():
      parser = ArgumentParser(
          description="Show statistics of the data directory."
      )
      parser.add_argument(
          "-d",
          "--data_dir",
          type=Path,
          required=True,
          help="Data directory.",
      )
      return parser
  
imports: from argparse import ArgumentParser
  from collections import defaultdict
  from pathlib import Path
label_desc: Use image node_id 2 for calling a global function with example usage: get_parser() and returns: parser