code: def add(
          self,
          years=0,
          months=0,
          weeks=0,
          days=0,
          hours=0,
          minutes=0,
          seconds=0,
          microseconds=0,
      ):  # type: (int, int, int, int, int, int, int) -> DateTime
          
          units_of_variable_length = any([years, months, weeks, days])
  
          current_dt = datetime.datetime(
              self.year,
              self.month,
              self.day,
              self.hour,
              self.minute,
              self.second,
              self.microsecond,
          )
          if not units_of_variable_length:
              offset = self.utcoffset()
              if offset:
                  current_dt = current_dt - offset
  
          dt = add_duration(
              current_dt,
              years=years,
              months=months,
              weeks=weeks,
              days=days,
              hours=hours,
              minutes=minutes,
              seconds=seconds,
              microseconds=microseconds,
          )
  
          if units_of_variable_length or self.tzinfo is None:
              return pendulum.datetime(
                  dt.year,
                  dt.month,
                  dt.day,
                  dt.hour,
                  dt.minute,
                  dt.second,
                  dt.microsecond,
                  tz=self.tz,
              )
  
          dt = self.__class__(
              dt.year,
              dt.month,
              dt.day,
              dt.hour,
              dt.minute,
              dt.second,
              dt.microsecond,
              tzinfo=UTC,
          )
  
          dt = self.tz.convert(dt)
  
          return self.__class__(
              dt.year,
              dt.month,
              dt.day,
              dt.hour,
              dt.minute,
              dt.second,
              dt.microsecond,
              tzinfo=self.tz,
              fold=dt.fold,
          )
docs: Add a duration to the instance.
  
          If we're adding units of variable length (i.e., years, months),
          move forward from curren time,
          otherwise move forward from utc, for accuracy
          when moving across DST boundaries.