code: def __getitem__(
      self, i: Union[int, slice]
  ) -> Union[BaseRecord, RecordCollection]:
      if isinstance(i, slice):
          return self.new(self._records.values()[i])
      elif isinstance(i, int):
          return self._records.values()[i]
      else:
          raise RuntimeError(
              f"method __getitem__ for type {type(i)} not implemented"
          )
  
file_path: icevision/icevision/data/record_collection.py
imports: from __future__ import annotations
  from icevision.imports import *
  from icevision.utils import *
  from icevision.core.record import BaseRecord, autofix_records
  from icevision.data.data_splitter import DataSplitter
label_desc: Use image node_id 7 for calling the RecordCollection obj's underlying member method code with example usage: obj.__getitem__(i) and returns: self, self