def __getattr__(self, name):
if name in self.__events__:<EOL><INDENT>return getattr(self.events, name)<EOL><DEDENT>def method(*args, **kwargs):<EOL><INDENT>if "<STR_LIT>" not in kwargs:<EOL><INDENT>if "<STR_LIT>" in kwargs:<EOL><INDENT>if kwargs["<STR_LIT>"] in self.api_id and self.api_id[kwargs["<STR_LIT>"]]:<EOL><INDENT>api_id = self.api_id[kwargs["<STR_LIT>"]]<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" % kwargs["<STR_LIT>"]<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>api_id = <NUM_LIT:0><EOL><DEDENT><DEDENT>else:<EOL><INDENT>api_id = kwargs["<STR_LIT>"]<EOL><DEDENT>self.num_retries = kwargs.get("<STR_LIT>", self.num_retries)<EOL>query = {<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": [api_id, name, list(args)],<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT:id>": self.get_request_id(),<EOL>}<EOL>r = self.rpcexec(query)<EOL>return r<EOL><DEDENT>return method<EOL>
Map all methods to RPC calls and pass through the arguments