code: def getdatas(args):
      # Get the data feed class from the global dictionary
      dfcls = DATAFORMATS[args.format]
  
      # Prepare some args
      dfkwargs = dict()
      if args.format == "yahoo_unreversed":
          dfkwargs["reverse"] = True
  
      fmtstr = "%Y-%m-%d"
      if args.fromdate:
          dtsplit = args.fromdate.split("T")
          if len(dtsplit) > 1:
              fmtstr += "T%H:%M:%S"
  
          fromdate = datetime.datetime.strptime(args.fromdate, fmtstr)
          dfkwargs["fromdate"] = fromdate
  
      fmtstr = "%Y-%m-%d"
      if args.todate:
          dtsplit = args.todate.split("T")
          if len(dtsplit) > 1:
              fmtstr += "T%H:%M:%S"
          todate = datetime.datetime.strptime(args.todate, fmtstr)
          dfkwargs["todate"] = todate
  
      if args.timeframe is not None:
          dfkwargs["timeframe"] = TIMEFRAMES[args.timeframe]
  
      if args.compression is not None:
          dfkwargs["compression"] = args.compression
  
      datas = list()
      for dname in args.data:
          dfkwargs["dataname"] = dname
          data = dfcls(**dfkwargs)
          datas.append(data)
  
      return datas
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import datetime
  import inspect
  import itertools
  import random
  import string
  import sys
  import backtrader
label_desc: Use image node_id 3 for calling a global function with example usage: getdatas(args) and returns: datas