def _do_autopaginating_api_call(self, path, params, method, parser_func,<EOL>next_marker_xpath, next_marker_param_name,<EOL>next_type_xpath=None, parser_kwargs=None):
if not parser_kwargs:<EOL><INDENT>parser_kwargs = {}<EOL><DEDENT>while True:<EOL><INDENT>root = self._send_request(path, params, method)<EOL>for record in parser_func(root, connection=self, **parser_kwargs):<EOL><INDENT>yield record<EOL><DEDENT>next_marker = root.find(next_marker_xpath)<EOL>if next_marker is None:<EOL><INDENT>break<EOL><DEDENT>params[next_marker_param_name] = next_marker.text<EOL>if next_type_xpath:<EOL><INDENT>next_type = root.find(next_type_xpath)<EOL>params['<STR_LIT:type>'] = next_type.text<EOL><DEDENT><DEDENT>
Given an API method, the arguments passed to it, and a function to
hand parsing off to, loop through the record sets in the API call
until all records have been yielded.


:param str method: The API method on the endpoint.
:param dict params: The kwargs from the top-level API method.
:param callable parser_func: A callable that is used for parsing the
    output from the API call.
:param str next_marker_param_name: The XPath to the marker tag that
    will determine whether we continue paginating.
:param str next_marker_param_name: The parameter name to manipulate
    in the request data to bring up the next page on the next
    request loop.
:keyword str next_type_xpath: For the
    py:meth:`list_resource_record_sets_by_zone_id` method, there's
    an additional paginator token. Specifying this XPath looks for it.
:keyword dict parser_kwargs: Optional dict of additional kwargs to pass
    on to the parser function.
:rtype: generator
:returns: Returns a generator that may be returned by the top-level
    API method.