def trigger_installed(connection: connection, table: str, schema: str='<STR_LIT>'):
installed = False<EOL>log('<STR_LIT>'.format(schema, table), logger_name=_LOGGER_NAME)<EOL>statement = SELECT_TRIGGER_STATEMENT.format(<EOL>table=table,<EOL>schema=schema<EOL>)<EOL>result = execute(connection, statement)<EOL>if result:<EOL><INDENT>installed = True<EOL><DEDENT>log('<STR_LIT>'.format('<STR_LIT>' if installed else '<STR_LIT>'), logger_name=_LOGGER_NAME)<EOL>return installed<EOL>
Test whether or not a psycopg2-pgevents trigger is installed for a table.

    Parameters
    ----------
    connection: psycopg2.extensions.connection
        Active connection to a PostGreSQL database.
    table: str
        Table whose trigger-existence will be checked.
    schema: str
        Schema to which the table belongs.

    Returns
    -------
    bool
        True if the trigger is installed, otherwise False.