code: def __getitem__(self, i):
      if torch.is_tensor(i) or isinstance(i, np.ndarray):
          i = i.tolist()
      if isinstance(i, int):
          return ObjectPredictionList([self.list[i]])
      elif isinstance(i, (tuple, list)):
          accessed_mapping = map(self.list.__getitem__, i)
          return ObjectPredictionList(list(accessed_mapping))
      else:
          raise NotImplementedError(f"{type(i)}")
  
imports: from collections.abc import Sequence
  from typing import List, Union
  import numpy
  import torch
  from sahi.annotation import BoundingBox, Category, Mask
  from sahi.prediction import ObjectPrediction
label_desc: Use image node_id 2 for calling the ObjectPredictionList obj's underlying member method code with example usage: obj.__getitem__(i) and returns: ObjectPredictionList, ObjectPredictionList