code: def expand_dates(date_list):
      expanded_dates = []
      for item in date_list:
          if type(item) == str:
              expanded_dates.append(item)
          elif type(item) == list:
              start_date = item[0]
              end_date = item[1]
              dates_dt = pd.date_range(start_date, end_date).tolist()
              dates_str = [x.strftime("%Y-%m-%d") for x in dates_dt]
              expanded_dates.extend(dates_str)
          else:
              logger.info("Error in date: %s" % item)
      return expanded_dates
  
imports: import calendar
  import logging
  import math
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: expand_dates(date_list) and returns: expanded_dates