def trigger_added(self, context, connection):
        """check if the trigger is added to the config file XML tree (returns True/False)"""
        # check if the specified KeePass configuration file exists
        if not self.keepass_config_path:
            context.log.fail("No KeePass configuration file specified, exiting")
            sys.exit(1)

        try:
            buffer = BytesIO()
            connection.conn.getFile(self.share, self.keepass_config_path.split(":")[1], buffer.write)
        except Exception as e:
            context.log.fail(f"Error while getting file '{self.keepass_config_path}', exiting: {e}")
            sys.exit(1)

        try:
            keepass_config_xml_root = ElementTree.fromstring(buffer.getvalue())
        except Exception as e:
            context.log.fail(f"Error while parsing file '{self.keepass_config_path}', exiting: {e}")
            sys.exit(1)

        # check if the specified KeePass configuration file does not already contain the malicious trigger
        for trigger in keepass_config_xml_root.findall(".//Application/TriggerSystem/Triggers/Trigger"):
            if trigger.find("Name").text == self.trigger_name:
                return True

        return False
check if the trigger is added to the config file XML tree (returns True/False)
cme/modules/keepass_trigger.py