docstr: Return a table with ``batch_size`` number of rows.
  
  :return: An instance of an Arrow table with exactly ``batch_size`` rows.
docstr_tok: ["Return","a","table","with","``","batch_size","``","number","of","rows",".",":","return",":","An","instance","of","an","Arrow","table","with","exactly","``","batch_size","``","rows","."]
code: def get(self):
      """Return a table with ``batch_size`` number of rows.
  
      :return: An instance of an Arrow table with exactly ``batch_size`` rows.
      """
  
      assert not self.empty()
  
      # head_idx points to the next row in the buffer[0] batch to be consumed.
      # Accumulate selices/full batches until result_rows reaches desired batch_size.
  
      # Pop left of the deque once exhausted all rows there.
      result = []
      result_rows = 0
      while result_rows < self._batch_size and self._cumulative_len > 0:
          head = self._buffer[0]
          piece = head[
              self._head_idx : self._head_idx
              + self._batch_size
              - result_rows
          ]
          self._head_idx += piece.num_rows
          result_rows += piece.num_rows
          result.append(piece)
  
          if head.num_rows == self._head_idx:
              self._head_idx = 0
              self._buffer.popleft()
              self._cumulative_len -= head.num_rows
  
      return pa.Table.from_batches(result)
  
imports: from collections import deque
  import pyarrow
label_desc: Use image node_id 4 for calling the BatchingTableQueue obj's underlying member method code with example usage: obj.get() and returns: pa