'Internal method used as get_result_hook for AllocateIds.'

def __allocate_ids_hook(self, rpc):

    self.check_rpc_success(rpc)
    pair = (rpc.response.start(), rpc.response.end())
    if (rpc.user_data is not None):
        pair = rpc.user_data(pair)
    return pair
