code: def parse_date(date):
      # Sample: 3-Dec-05
      # This custom parsing works faster than:
      # datetime.datetime.strptime(date, "%d-%b-%y")
      month_abbr = {
          "Jan": 1,
          "Feb": 2,
          "Mar": 3,
          "Apr": 4,
          "May": 5,
          "Jun": 6,
          "Jul": 7,
          "Aug": 8,
          "Sep": 9,
          "Oct": 10,
          "Nov": 11,
          "Dec": 12,
      }
      date = date.split("-")
      year = int(date[2]) + 2000
      if year > datetime.datetime.today().year:
          # it's probably 20th century
          year -= 100
      month = int(month_abbr[date[1]])
      day = int(date[0])
      ret = datetime.datetime(year, month, day)
      return ret
  
file_path: pyalgotrade/pyalgotrade/barfeed/googlefeed.py
imports: from pyalgotrade.barfeed import csvfeed
  from pyalgotrade.barfeed import common
  from pyalgotrade.utils import dt
  from pyalgotrade import bar
  import datetime
label_desc: Use image node_id 1 for calling a global function with example usage: parse_date(date) and returns: ret