def METHOD_NAME(call: RPCCallBase) -> int:
    r"""Registers a call for RPC requests."""
    global _rpc_call_id, _rpc_call_pool
    with _rpc_call_lock:
        call_id = _rpc_call_id
        _rpc_call_id += 1
        if call_id in _rpc_call_pool:
            raise RuntimeError("Registered function twice in 'rpc_register'")
        _rpc_call_pool[call_id] = call
    return call_id