code: def parse_args(pargs=None):
      parser = argparse.ArgumentParser(
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
          description="Sample Sharpe Ratio",
      )
  
      parser.add_argument(
          "--ret1",
          required=False,
          action="store",
          type=float,
          default=0.023286,
          help=("Annual Return 1"),
      )
  
      parser.add_argument(
          "--ret2",
          required=False,
          action="store",
          type=float,
          default=0.0257816485323,
          help=("Annual Return 2"),
      )
  
      parser.add_argument(
          "--riskfreerate",
          required=False,
          action="store",
          type=float,
          default=0.01,
          help=("Risk free rate (decimal) for the Sharpe Ratio"),
      )
  
      if pargs is not None:
          return parser.parse_args(pargs)
  
      return parser.parse_args()
  
file_path: backtrader/samples/sratio/sratio.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import itertools
  import math
  import operator
  import sys
label_desc: Use image node_id 5 for calling a global function with example usage: parse_args(pargs) and returns: parser, parser