code: def parse_args():
      parser = argparse.ArgumentParser(
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
          description="Calendar Days Filter Sample",
      )
  
      parser.add_argument(
          "--data",
          "-d",
          default="YHOO",
          help="Ticker to download from Yahoo",
      )
  
      parser.add_argument(
          "--fromdate",
          "-f",
          default="2006-01-01",
          help="Starting date in YYYY-MM-DD format",
      )
  
      parser.add_argument(
          "--todate",
          "-t",
          default="2006-12-31",
          help="Starting date in YYYY-MM-DD format",
      )
  
      parser.add_argument(
          "--period",
          default=15,
          type=int,
          help="Period to apply to the Simple Moving Average",
      )
  
      parser.add_argument(
          "--writer",
          "-w",
          action="store_true",
          help="Add a writer to cerebro",
      )
  
      parser.add_argument(
          "--wrcsv",
          "-wc",
          action="store_true",
          help="Enable CSV Output in the writer",
      )
  
      parser.add_argument(
          "--plot", "-p", action="store_true", help="Plot the read data"
      )
  
      parser.add_argument(
          "--numfigs",
          "-n",
          default=1,
          type=int,
          help="Plot using numfigs figures",
      )
  
      return parser.parse_args()
  
file_path: backtrader/samples/yahoo-test/yahoo-test.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import datetime
  import backtrader
  import backtrader.indicators
  import backtrader.feeds
  import backtrader.filters
label_desc: Use image node_id 2 for calling a global function with example usage: parse_args() and returns: parser