def __init__(self, *, parent=None, data=None, constructor=None,<EOL>next_link=None, limit=None, **kwargs):
if parent is None:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>super().__init__(protocol=parent.protocol,<EOL>main_resource=parent.main_resource)<EOL>self.parent = parent<EOL>self.con = parent.con<EOL>self.constructor = constructor<EOL>self.next_link = next_link<EOL>self.limit = limit<EOL>self.data = data = list(data) if data else []<EOL>data_count = len(data)<EOL>if limit and limit < data_count:<EOL><INDENT>self.data_count = limit<EOL>self.total_count = limit<EOL><DEDENT>else:<EOL><INDENT>self.data_count = data_count<EOL>self.total_count = data_count<EOL><DEDENT>self.state = <NUM_LIT:0><EOL>self.extra_args = kwargs<EOL>
Returns an iterator that returns data until it's exhausted.
        Then will request more data (same amount as the original request)
        to the server until this data is exhausted as well.
        Stops when no more data exists or limit is reached.

        :param parent: the parent class. Must implement attributes:
         con, api_version, main_resource
        :param data: the start data to be return
        :param constructor: the data constructor for the next batch.
         It can be a function.
        :param str next_link: the link to request more data to
        :param int limit: when to stop retrieving more data
        :param kwargs: any extra key-word arguments to pass to the
         construtctor.