def compare_access_token(self):
        """compare_access_token will compare the current access token with the access token stored in keyvault
        and update the header for further use.
        """
        __method_name = inspect.currentframe().f_code.co_name
        try:
            keyvault_access_token = self.keyvault_obj.get_keyvault_secret(self.access_token_key)
            header_access_token = self.header.get("Authorization")
            if keyvault_access_token == header_access_token:
                logging.info(consts.LOG_FORMAT.format(
                    __method_name, "KeyVault Access Token Invalid. Generating New Token."
                ))
                self.get_access_token()
            else:
                logging.info(consts.LOG_FORMAT.format(
                    __method_name, "KeyVault Access Token Updated. Updating Header Value."
                ))
                self.header.update({"Authorization": keyvault_access_token})
        except ArmisException:
            raise ArmisException()
        except Exception as err:
            logging.error(
                consts.LOG_FORMAT.format(
                    __method_name,
                    "Unexpected error : {}.".format(err),
                )
            )
            raise ArmisException()
compare_access_token will compare the current access token with the access token stored in keyvault
        and update the header for further use.
        
Solutions/Armis/Data Connectors/ArmisAlertsActivities/ArmisAlertActivitySentinelConnector/utils.py