code: def runstrat(args=None):
      args = parse_args(args)
  
      cerebro = bt.Cerebro()
      cerebro.broker.set_cash(args.cash)
  
      dkwargs = dict()
      if args.fromdate is not None:
          fromdate = datetime.datetime.strptime(
              args.fromdate, "%Y-%m-%d"
          )
          dkwargs["fromdate"] = fromdate
  
      if args.todate is not None:
          todate = datetime.datetime.strptime(args.todate, "%Y-%m-%d")
          dkwargs["todate"] = todate
  
      # if dataset is None, args.data has been given
      data0 = bt.feeds.YahooFinanceCSVData(
          dataname=args.data0, **dkwargs
      )
      cerebro.adddata(data0, name="MyData0")
  
      st0kwargs = dict()
      if args.st0 is not None:
          tmpdict = eval("dict(" + args.st0 + ")")  # args were passed
          st0kwargs.update(tmpdict)
  
      cerebro.addstrategy(
          TheStrategy, myname="St1", dtarget="MyData0", **st0kwargs
      )
  
      if args.copydata:
          data1 = data0.copyas("MyData1")
          cerebro.adddata(data1)
          dtarget = "MyData1"
  
      else:  # use same target
          dtarget = "MyData0"
  
      st1kwargs = dict()
      if args.st1 is not None:
          tmpdict = eval("dict(" + args.st1 + ")")  # args were passed
          st1kwargs.update(tmpdict)
  
      cerebro.addstrategy(
          TheStrategy2, myname="St2", dtarget=dtarget, **st1kwargs
      )
  
      results = cerebro.run()
  
      if args.plot:
          pkwargs = dict(style="bar")
          if args.plot is not True:  # evals to True but is not True
              npkwargs = eval(
                  "dict(" + args.plot + ")"
              )  # args were passed
              pkwargs.update(npkwargs)
  
          cerebro.plot(**pkwargs)
  
file_path: backtrader/samples/multi-copy/multi-copy.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import datetime
  import random
  import backtrader
label_desc: Use image node_id 1 for calling a global function with example usage: runstrat(args) without return types