def next_response(self, method, *args, **kw):
if self.log.propagate:<EOL><INDENT>self.log.info('<STR_LIT>'.format(method, args))<EOL>self.counter['<STR_LIT:all>'] += <NUM_LIT:1><EOL>self.counter[method] += <NUM_LIT:1><EOL><DEDENT>resp = self.responses.get(method) or kw.get('<STR_LIT:default>')<EOL>if self.base_connection is not None:<EOL><INDENT>return getattr(self.base_connection, method)(*args)<EOL><DEDENT>elif callable(resp):<EOL><INDENT>return resp(*args)<EOL><DEDENT>elif isinstance(resp, list):<EOL><INDENT>try:<EOL><INDENT>return resp.pop(<NUM_LIT:0>)<EOL><DEDENT>except IndexError:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return resp<EOL><DEDENT>
Returns the next response for a particular method call.  This
can be used to drive the connection response information.

:param method: <str>

:return: <variant>