code: def parse_args():
      parser = argparse.ArgumentParser(
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
          description="Sample for aligning with trade ",
      )
  
      parser.add_argument(
          "--online",
          required=False,
          action="store_true",
          help="Fetch data online from Yahoo",
      )
  
      parser.add_argument(
          "--data0", required=True, help="Data 0 to be read in"
      )
      parser.add_argument(
          "--data1", required=False, help="Data 1 to be read in"
      )
  
      parser.add_argument(
          "--sma",
          required=False,
          default=0,
          type=int,
          help="Add a sma to the datas",
      )
  
      parser.add_argument(
          "--fillclose",
          required=False,
          action="store_true",
          help="Fill with Close price instead of NaN",
      )
  
      parser.add_argument(
          "--filler",
          required=False,
          action="store_true",
          help="Add Filler to Datas 0 and 1",
      )
  
      parser.add_argument(
          "--filler0",
          required=False,
          action="store_true",
          help="Add Filler to Data 0",
      )
  
      parser.add_argument(
          "--filler1",
          required=False,
          action="store_true",
          help="Add Filler to Data 1",
      )
  
      parser.add_argument(
          "--fromdate",
          "-f",
          default="2012-01-01",
          help="Starting date in YYYY-MM-DD format",
      )
  
      parser.add_argument(
          "--todate",
          "-t",
          default="2012-12-31",
          help="Ending date in YYYY-MM-DD format",
      )
  
      parser.add_argument(
          "--plot", required=False, action="store_true", help="Do plot"
      )
  
      return parser.parse_args()
  
file_path: backtrader/samples/weekdays-filler/weekdaysaligner.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import datetime
  import backtrader
  import backtrader.feeds
  import backtrader.indicators
  import backtrader.utils.flushfile
  from weekdaysfiller import WeekDaysFiller
label_desc: Use image node_id 2 for calling a global function with example usage: parse_args() and returns: parser