code: def get_last_monday(year):
      ret = datetime.date(year, 12, 31)
      if ret.weekday() != 0:
          diff = ret.weekday() * -1
          ret = ret + datetime.timedelta(days=diff)
      return ret
  
file_path: pyalgotrade/pyalgotrade/utils/dt.py
imports: import datetime
  import pytz
label_desc: Use image node_id 8 for calling a global function with example usage: get_last_monday(year) and returns: ret