code: def parse_args(pargs=None):
      parser = argparse.ArgumentParser(
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
          description="Sample for pinkfish challenge",
      )
  
      parser.add_argument(
          "--data",
          required=False,
          default="../../datas/yhoo-1996-2015.txt",
          help="Data to be read in",
      )
  
      parser.add_argument(
          "--fromdate",
          required=False,
          default="2005-01-01",
          help="Starting date in YYYY-MM-DD format",
      )
  
      parser.add_argument(
          "--todate",
          required=False,
          default="2006-12-31",
          help="Ending date in YYYY-MM-DD format",
      )
  
      parser.add_argument(
          "--cash",
          required=False,
          action="store",
          type=float,
          default=50000,
          help=("Cash to start with"),
      )
  
      parser.add_argument(
          "--sellafter",
          required=False,
          action="store",
          type=int,
          default=2,
          help=("Sell after so many bars in market"),
      )
  
      parser.add_argument(
          "--highperiod",
          required=False,
          action="store",
          type=int,
          default=20,
          help=("Period to look for the highest"),
      )
  
      parser.add_argument(
          "--no-replay",
          required=False,
          action="store_true",
          help=("Use Replay + replay filter"),
      )
  
      parser.add_argument(
          "--market",
          required=False,
          action="store_true",
          help=("Use Market exec instead of Close"),
      )
  
      parser.add_argument(
          "--oldbuysell",
          required=False,
          action="store_true",
          help=("Old buysell plot behavior - ON THE PRICE"),
      )
  
      # 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 (escape the quotes if needed):\n"
              "\n"
              '  --plot style="candle" (to plot candles)\n'
          ),
      )
  
      if pargs is not None:
          return parser.parse_args(pargs)
  
      return parser.parse_args()
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import datetime
  import backtrader
  import backtrader.indicators
label_desc: Use image node_id 2 for calling a global function with example usage: parse_args(pargs) and returns: parser, parser