<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def search_read_all(self, domain, order, fields, batch_size=500, context=None, offset=0, limit=None):
 """ An endless iterator that iterates over records. :param domain: A search domain :param order: The order clause for search read :param fields: The fields argument for search_read :param batch_size: The optimal batch size when sending paginated requests """

        if context is None:
            context = {}

        if limit is None:
            # When no limit is specified, all the records
            # should be fetched.
            record_count = self.search_count(domain, context=context)
            end = record_count + offset
        else:
            end = limit + offset

        for page_offset in range(offset, end, batch_size):
            if page_offset + batch_size > end:
                batch_size = end - page_offset
            for record in self.search_read(
                    domain, page_offset, batch_size,
                    order, fields, context=context):
                yield record