def rpc(f=None, **kwargs):
if f is not None:<EOL><INDENT>if isinstance(f, six.string_types):<EOL><INDENT>if '<STR_LIT:name>' in kwargs:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>kwargs['<STR_LIT:name>'] = f<EOL><DEDENT>else:<EOL><INDENT>return rpc(**kwargs)(f)<EOL><DEDENT><DEDENT>return functools.partial(_rpc, **kwargs)<EOL>
Marks a method as RPC.