code: def __getitem__(self, index):
      from ...operation.element import method
      from ..data import Dataset
  
      in_method = self.dataset._in_method
      if not in_method:
          self.dataset._in_method = True
      try:
          res = self._perform_getitem(self.dataset, index)
          if not in_method and isinstance(res, Dataset):
              getitem_op = method.instance(
                  input_type=type(self),
                  output_type=type(self.dataset),
                  method_name="_perform_getitem",
                  args=[index],
              )
              res._pipeline = self.dataset.pipeline.instance(
                  operations=self.dataset.pipeline.operations
                  + [getitem_op],
                  output_type=type(self.dataset),
              )
      finally:
          if not in_method:
              self.dataset._in_method = False
      return res
  
imports: import sys
  import warnings
  import numpy
  import param
  from ..None import util
  from ..element import Element
  from ..ndmapping import NdMapping
  from .util import finite_range
label_desc: Use image node_id 2 for calling the Accessor obj's underlying member method code with example usage: obj.__getitem__(index) and returns: res