def rule_action(label=None, params=None):
    def wrapper(func):
        params_ = params
        if isinstance(params, dict):
            params_ = [dict(label=fn_name_to_pretty_label(name),
                           name=name,
                           fieldType=field_type) \
                      for name, field_type in params.items()]
        _validate_action_parameters(func, params_)
        func.is_rule_action = True
        func.label = label \
                or fn_name_to_pretty_label(func.__name__)
        func.params = params_
        return func
    return wrapper
Decorator to make a function into a rule action
dataset/ETHPy150Open venmo/business-rules/business_rules/actions.py/rule_action