human
Complete the below
def emits_warning_on(db, *warnings):

    ''''Mark a test as emitting a warning on a specific dialect.
    With no arguments, squelches all SAWarning failures.  Or pass one or more
    strings.
these will be matched to the root of the warning description by
    warnings.filterwarnings().'
    '''
assistant
#Here is the Python code you requested.
    spec = db_spec(db)
    @decorator
    def decorate(fn, *args, **kw):
        if isinstance(db, util.string_types):
            if (not spec(config._current)):
                return fn(*args, **kw)
            else:
                wrapped = emits_warning(*warnings)(fn)
                return wrapped(*args, **kw)
        elif (not _is_excluded(*db)):
            return fn(*args, **kw)
        else:
            wrapped = emits_warning(*warnings)(fn)
            return wrapped(*args, **kw)
    return decorate