def validate(**kwargs):
    def decorator(func):
        _VALIDATORS[kwargs.pop('name', func.__name__)] = func
        return func

    return decorator
Defines a decorator to register a validator with a name for look-up.
dataset/ETHPy150Open osrg/ryu/ryu/services/protocols/bgp/base.py/validate