<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def upcoming_shabbat_or_yom_tov(self):
 """Return the HDate for the upcoming or current Shabbat or Yom Tov. If it is currently Shabbat, returns the HDate of the Saturday. If it is currently Yom Tov, returns the HDate of the first day (rather than "leil" Yom Tov). To access Leil Yom Tov, use upcoming_shabbat_or_yom_tov.previous_day. """

        if self.is_shabbat or self.is_yom_tov:
            return self

        if self.upcoming_yom_tov < self.upcoming_shabbat:
            return self.upcoming_yom_tov
        return self.upcoming_shabbat