def check_expiration_date(cls, v: Optional[datetime]) -> Optional[datetime]:
        """Validate the expiration date.

        Args:
        ----
            v (datetime): The expiration date.

        Raises:
        ------
            ValueError: If the expiration date is in the past or more than 1 year in the future.

        Returns:
        -------
            datetime: The expiration date.

        """
        if v is None:
            return None

        now = datetime.now(timezone.utc)
        if v < now:
            raise ValueError("Expiration date cannot be in the past.")
        if v > now.replace(year=now.year + 1):
            raise ValueError("Expiration date cannot be more than 1 year in the future.")
        return v
Validate the expiration date.

        Args:
        ----
            v (datetime): The expiration date.

        Raises:
        ------
            ValueError: If the expiration date is in the past or more than 1 year in the future.

        Returns:
        -------
            datetime: The expiration date.

        
backend/airweave/schemas/api_key.py