code: def get_eu_dst_end(year):
      """For each year, it returns the last Sunday in October,
      which is the end of the daylight saving (DST) in Europe.
  
      We assume Europe DST ends on last Sunday of October at 2 a.m.
  
      Parameters
      ----------
      year : `int`
          Year for which DST end date is desired.
  
      Returns
      -------
      result : `datetime.datetime`
          The timestamp of end of DST in Europe.
      """
      # October is 31 days.
      # Finds the last date in the month.
      date_in_last_week = datetime(year, 10, 31, 2)
      # Finds out which week day it is:
      weekday = date_in_last_week.weekday()
      # If above date is already a Sunday, returns it.
      if weekday == 6:
          return date_in_last_week
      # Otherwise, goes back to the Monday of that week and does an extra -1.
      last_sunday_date = date_in_last_week.replace(
          day=(31 - weekday - 1)
      )
      return last_sunday_date
  
imports: import math
  from datetime import datetime
  from datetime import timedelta
  import numpy
  import pandas
  import pytz
  from holidays_ext import get_holidays
  from pandas.tseries.frequencies import to_offset
  from scipy.special import expit
  from greykite.common import constants
  from greykite.common.python_utils import split_offset_str
label_desc: Use image node_id 7 for calling a global function with example usage: get_eu_dst_end(year) and returns: last_sunday_date, date_in_last_week