class_docstr: A set of excellent Records from a query.
class_docstr_tok: ["A","set","of","excellent","Records","from","a","query","."]
code: def __getitem__(self, key):
      is_int = isinstance(key, int)
  
      # Convert RecordCollection[1] into slice.
      if is_int:
          key = slice(key, key + 1)
  
      while len(self) < key.stop or key.stop is None:
          try:
              next(self)
          except StopIteration:
              break
  
      rows = self._all_rows[key]
      if is_int:
          return rows[0]
      else:
          return RecordCollection(iter(rows))
  
imports: import os
  from sys import stdout
  from collections import OrderedDict
  from contextlib import contextmanager
  from inspect import isclass
  import tablib
  from docopt import docopt
  from sqlalchemy import create_engine, exc, inspect, text
label_desc: Use image node_id 6 for calling the RecordCollection obj's underlying member method code with example usage: obj.__getitem__(key) and returns: rows, RecordCollection