def date_time_this_decade(
        self,
        before_now: bool = True,
        after_now: bool = False,
        tzinfo: Optional[TzInfo] = None,
    ) -> datetime:
        """
        Gets a datetime object for the decade year.

        :param before_now: include days in current decade before today. Defaults to True
        :param after_now: include days in current decade after today. Defaults to False
        :param tzinfo: timezone, instance of datetime.tzinfo subclass

        :sample:
        :sample: before_now=False, after_now=True
        """
        now = datetime.now(tzinfo)
        this_decade_start = datetime(now.year - (now.year % 10), 1, 1, tzinfo=tzinfo)
        next_decade_start = datetime(min(this_decade_start.year + 10, MAXYEAR), 1, 1, tzinfo=tzinfo)

        if before_now and after_now:
            return self.date_time_between_dates(this_decade_start, next_decade_start, tzinfo)
        elif not before_now and after_now:
            return self.date_time_between_dates(now, next_decade_start, tzinfo)
        elif not after_now and before_now:
            return self.date_time_between_dates(this_decade_start, now, tzinfo)
        else:
            return now

        Gets a datetime object for the decade year.

        :param before_now: include days in current decade before today. Defaults to True
        :param after_now: include days in current decade after today. Defaults to False
        :param tzinfo: timezone, instance of datetime.tzinfo subclass

        :sample:
        :sample: before_now=False, after_now=True
        
faker/providers/date_time/__init__.py