code: def getdata(index, fromdate=FROMDATE, todate=TODATE):
      datapath = os.path.join(modpath, dataspath, datafiles[index])
      data = DATAFEED(
          dataname=datapath, fromdate=fromdate, todate=todate
      )
  
      return data
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import datetime
  import os
  import os.path
  import sys
  import backtrader
  import backtrader.utils.flushfile
  from backtrader.metabase import ParamsBase
label_desc: Use image node_id 1 for calling a global function with example usage: getdata(index, fromdate, todate) and returns: data