code: def stringToDate(stringDate, strfmt="%Y%m%d"):
      """Converts a string format date into datetime
      Parameters:
      -----------
              stringDate : string
                      date in string format
              strfmt : string
                      format in which the input date is represented
      """
      return dt.datetime.strptime(stringDate, strfmt).date()
  
imports: import datetime
label_desc: Use image node_id 3 for calling a global function with example usage: stringToDate(stringDate, strfmt) and returns: dt