def _encode(
        self, index: SupportedIndex, target_end: pd.Timestamp, dtype: np.dtype
    ) -> TimeSeries:
        """applies cyclic encoding from `datetime_attribute_timeseries()` to `self.attribute` of `index`."""
        super()._encode(index, target_end, dtype)
        return datetime_attribute_timeseries(
            index,
            attribute=self.attribute,
            cyclic=True,
            dtype=dtype,
            with_columns=[
                self.base_component_name + self.attribute + "_sin",
                self.base_component_name + self.attribute + "_cos",
            ],
            tz=self.tz,
        )
applies cyclic encoding from `datetime_attribute_timeseries()` to `self.attribute` of `index`.
darts/dataprocessing/encoders/encoders.py