'Invokes all hooks in this collection.
NOTE: For backwards compatibility, if error is not None, hooks
with 4 or 5 arguments are *not* called.  This situation
(error=None) only occurs when the RPC request raised an exception;
in the past no hooks would be called at all in that case.
Args:
service: string representing which service to call
call: string representing which function to call
request: protocol buffer for the request
response: protocol buffer for the response
rpc: optional RPC used to make this call
error: optional Exception instance to be passed as 6th argument'

def Call(self, service, call, request, response, rpc=None, error=None):

    for (key, function, srv, num_args) in self.__content:
        if ((srv is None) or (srv == service)):
            if (num_args == 6):
                function(service, call, request, response, rpc, error)
            elif (error is not None):
                pass
            elif (num_args == 5):
                function(service, call, request, response, rpc)
            else:
                function(service, call, request, response)
