def filters(dbname, exception_type, regex):
    def _receive(fn):
        _registry[dbname][exception_type].extend(
            (fn, re.compile(reg))
            for reg in
            ((regex,) if not isinstance(regex, tuple) else regex)
        )
        return fn
    return _receive


# NOTE(zzzeek) - for Postgresql, catch both OperationalError, as the
# actual error is
# psycopg2.extensions.TransactionRollbackError(OperationalError),
# as well as sqlalchemy.exc.DBAPIError, as SQLAlchemy will reraise it
# as this until issue #3075 is fixed.
In issue 7750, it was found that if the filename has a sequence that
dataset/ETHPy150Open openstack/oslo.db/oslo_db/sqlalchemy/exc_filters.py/filters--crossover with--dataset/ETHPy150Open francelabs/datafari/windows/python/Lib/test/test_pdb.py/ModuleInitTester.test_filename_correct