def is_token_expired(self, token_expiration):
        """To check if token is expired or not.

        Returns:
            bool: True or False
        """
        if not token_expiration:
            return True
        current_time = datetime.datetime.now().isoformat()
        return bool(token_expiration and (current_time > (token_expiration)))
To check if token is expired or not.

        Returns:
            bool: True or False
        
Solutions/Vectra XDR/Data Connectors/VectraDataConnector/SharedCode/collector.py