code: def parse_args(pargs=None):
      parser = argparse.ArgumentParser(
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
          description="Sample for Roll Over of Futures",
      )
  
      parser.add_argument(
          "--no-cerebro",
          required=False,
          action="store_true",
          help="Use RollOver Directly",
      )
  
      parser.add_argument(
          "--rollover", required=False, action="store_true"
      )
  
      parser.add_argument(
          "--checkdate",
          required=False,
          action="store_true",
          help="Change during expiration week",
      )
  
      parser.add_argument(
          "--checkcondition",
          required=False,
          action="store_true",
          help="Change when a given condition is met",
      )
  
      # Plot options
      parser.add_argument(
          "--plot",
          "-p",
          nargs="?",
          required=False,
          metavar="kwargs",
          const=True,
          help=(
              "Plot the read data applying any kwargs passed\n"
              "\n"
              "For example:\n"
              "\n"
              '  --plot style="candle" (to plot candles)\n'
          ),
      )
  
      if pargs is not None:
          return parser.parse_args(pargs)
  
      return parser.parse_args()
  
file_path: backtrader/samples/rollover/rollover.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import bisect
  import calendar
  import datetime
  import backtrader
label_desc: Use image node_id 4 for calling a global function with example usage: parse_args(pargs) and returns: parser, parser