'Remove an RPC object from the list of pending RPCs.
If the argument is a MultiRpc object, the wrapped RPCs are removed
from the list of pending RPCs.'

def _remove_pending(self, rpc):

    if isinstance(rpc, MultiRpc):
        for wrapped_rpc in rpc._MultiRpc__rpcs:
            self._remove_pending(wrapped_rpc)
    else:
        try:
            self.__pending_rpcs.remove(rpc)
        except KeyError:
            pass
