code: def register_backend(self, name, backend):
          
          if not hasattr(backend, 'send') or not callable(backend.send):
              raise ValueError('Backend %s does not have a callable "send" method.' % backend.__class__.__name__)
          else:
              self.backends[name] = backend
docs: Register a new backend that will be called for each processed event.
  
          Note that backends are called in the order that they are registered.