code: def fetchmany(self, size=None):
          
          if self._state == self._STATE_NONE:
              raise Exception("No query yet")
  
          if size is None:
              size = 1
  
          if not self._data:
              return []
          else:
              if len(self._data) > size:
                  result, self._data = self._data[:size], self._data[size:]
              else:
                  result, self._data = self._data, []
              self._rownumber += len(result)
              return result
docs: Fetch the next set of rows of a query result, returning a sequence of sequences (e.g. a
          list of tuples). An empty sequence is returned when no more rows are available.
  
          The number of rows to fetch per call is specified by the parameter. If it is not given, the
          cursor's arraysize determines the number of rows to be fetched. The method should try to
          fetch as many rows as indicated by the size parameter. If this is not possible due to the
          specified number of rows not being available, fewer rows may be returned.