class_docstr: ndloc is a small wrapper object that allows ndarray-like indexing
  for gridded Datasets using the ``.ndloc`` property. It supports
  the standard NumPy ndarray indexing semantics including
  integer indices, slices, lists and arrays of values. For more
  information see the ``Dataset.ndloc`` property docstring.
code: def _perform_getitem(cls, dataset, indices):
      ds = dataset
      indices = util.wrap_tuple(indices)
      if not ds.interface.gridded:
          raise IndexError(
              "Cannot use ndloc on non nd-dimensional datastructure"
          )
      selected = dataset.interface.ndloc(ds, indices)
      if np.isscalar(selected):
          return selected
      params = {}
      if hasattr(ds, "bounds"):
          params["bounds"] = None
      return dataset.clone(
          selected,
          datatype=[ds.interface.datatype] + ds.datatype,
          **params,
      )
  
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 1 for calling the ndloc obj's underlying member method code with example usage: obj._perform_getitem(cls, dataset, indices) and returns: dataset, selected