code: def eval(self) -> datetime:
      dttm_expression, unit = self.value
      dttm = dttm_expression.eval()
      if unit == "year":
          return dttm.replace(
              month=12,
              day=31,
              hour=0,
              minute=0,
              second=0,
              microsecond=0,
          )
      if unit == "month":
          return dttm.replace(
              day=calendar.monthrange(dttm.year, dttm.month)[1],
              hour=0,
              minute=0,
              second=0,
              microsecond=0,
          )
      # unit == "week":
      mon = dttm - relativedelta(days=dttm.weekday())
      mon = mon.replace(hour=0, minute=0, second=0, microsecond=0)
      return mon + relativedelta(days=6)
  
imports: import calendar
  import logging
  import re
  from datetime import datetime, timedelta
  from functools import lru_cache
  from time import struct_time
  from typing import Optional
  import pandas
  import parsedatetime
  from dateutil.parser import parse
  from dateutil.relativedelta import relativedelta
  from flask_babel import lazy_gettext
  from holidays import country_holidays
  from pyparsing import CaselessKeyword, Forward, Group, Optional, ParseException, ParserElement, ParseResults, pyparsing_common, quotedString, Suppress
  from superset.commands.chart.exceptions import TimeDeltaAmbiguousError, TimeRangeAmbiguousError, TimeRangeParseFailError
  from superset.constants import LRU_CACHE_MAX_SIZE, NO_TIME_RANGE
label_desc: Use image node_id 2 for calling the EvalLastDayFunc obj's underlying member method code with example usage: obj.eval() and returns: unknown, dttm, dttm