code: def run(pargs=None):
      args = parse_args(pargs)
  
      returns = [args.ret1, args.ret2]
      retfree = args.riskfreerate
  
      print("returns is:", returns, " - retfree is:", retfree)
  
      # Directly from backtrader
      retfree = itertools.repeat(retfree)
      ret_free = map(operator.sub, returns, retfree)  # excess returns
      ret_free_avg = average(
          list(ret_free)
      )  # mean of the excess returns
      print("returns excess mean:", ret_free_avg)
      retdev = standarddev(returns)  # standard deviation
      print("returns standard deviation:", retdev)
      ratio = (
          ret_free_avg / retdev
      )  # mean excess returns  / std deviation
      print("Sharpe Ratio is:", ratio)
  
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 4 for calling a global function with example usage: run(pargs) without return types