def jsonrpc_method(**kwargs):
    """Marks session handler method as json-rpc method."""

    def decorator(func):
        func.jsonrpc_method = True
        func.kwargs = kwargs
        return func

    return decorator