<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply(self, binding_type, **args):
 """Returns apply function"""

        rule = self.find_rule(binding_type, **args)
        if rule is None:
            error = BindingError('Binding rule is not found')
            error.add_info('Binding type', binding_type)
            error.add_info('args', args)
            raise error
        binding = rule.apply(**args)
        if binding:
            args['node'].add_binding(rule.apply(**args))