code: def fetchmany(self, size=None):
          
          self._check_closed()
          if not self._executed:
              raise ProgrammingError("Require execute() first")
          if size is None:
              size = self.arraysize
  
          result = []
          cnt = 0
          while cnt != size:
              try:
                  result.append(next(self._buffer))
                  cnt += 1
              except StopIteration:
                  break
  
          if cnt == size or self._received_last_resultset_part:
              # No rows are missing or there are no additional rows
              return result
  
          request = RequestMessage.new(
              self.connection,
              RequestSegment(
                  message_types.FETCHNEXT,
                  (ResultSetId(self._resultset_id), FetchSize(size - cnt))
              )
          )
          response = self.connection.send_request(request)
  
          resultset_part = response.segments[0].parts[1]
          if resultset_part.attribute & 1:
              self._received_last_resultset_part = True
          result.extend(resultset_part.unpack_rows(self._column_types, self.connection))
          return result
docs: Fetch many rows from select result set.
          :param size: Number of rows to return.
          :returns: list of row records (tuples)