code: def _get_rows(self, options):
          
  
          if options["oldsortslice"]:
              rows = copy.deepcopy(self._rows[options["start"]:options["end"]])
          else:
              rows = copy.deepcopy(self._rows)
  
          # Sort
          if options["sortby"]:
              sortindex = self._field_names.index(options["sortby"])
              # Decorate
              rows = [[row[sortindex]] + row for row in rows]
              # Sort
              rows.sort(reverse=options["reversesort"], key=options["sort_key"])
              # Undecorate
              rows = [row[1:] for row in rows]
  
          # Slice if necessary
          if not options["oldsortslice"]:
              rows = rows[options["start"]:options["end"]]
  
          return rows
docs: Return only those data rows that should be printed, based on slicing and sorting.
  
          Arguments:
  
          options - dictionary of option settings.