docstr: Loads all rows from a piece
docstr_tok: ["Loads","all","rows","from","a","piece"]
code: def _load_rows(self, pq_file, piece, shuffle_row_drop_range):
      """Loads all rows from a piece"""
  
      # pyarrow would fail if we request a column names that the dataset is partitioned by, so we strip them from
      # the `columns` argument.
      partitions = self._dataset.partitions
      # self._dataset.partitions is None, if make_reader is created directly from a parquet file
      # (and not a directory with *.parquet files)
      partition_names = (
          partitions.partition_names if partitions else set()
      )
      column_names = (
          set(field.name for field in self._schema.fields.values())
          - partition_names
      )
  
      all_rows = self._read_with_shuffle_row_drop(
          piece, pq_file, column_names, shuffle_row_drop_range
      )
  
      all_rows = [
          utils.decode_row(row, self._schema) for row in all_rows
      ]
  
      if self._transform_spec:
          all_rows = _apply_transform_spec(
              all_rows, self._transform_spec
          )
  
      return all_rows
  
imports: from __future__ import division
  import hashlib
  import threading
  from collections.abc import Iterable
  import numpy
  from pyarrow import parquet
  from pyarrow.parquet import ParquetFile
  from petastorm import utils
  from petastorm.cache import NullCache
  from petastorm.workers_pool import EmptyResultError
  from petastorm.workers_pool.worker_base import WorkerBase
label_desc: Use image node_id 4 for calling the PyDictReaderWorker obj's underlying member method code with example usage: obj._load_rows(pq_file, piece, shuffle_row_drop_range) and returns: all_rows