code: def iloc(cls, dataset, index):
      from spatialpandas import GeoSeries
      from spatialpandas.geometry import MultiPointDtype
  
      rows, cols = index
      geom_dims = cls.geom_dims(dataset)
      geom_col = cls.geo_column(dataset.data)
      scalar = False
      columns = list(dataset.data.columns)
      if isinstance(cols, slice):
          cols = [d.name for d in dataset.dimensions()][cols]
      elif np.isscalar(cols):
          scalar = np.isscalar(rows)
          cols = [dataset.get_dimension(cols).name]
      else:
          cols = [dataset.get_dimension(d).name for d in index[1]]
      if not all(d in cols for d in geom_dims):
          raise DataError(
              "Cannot index a dimension which is part of the "
              "geometry column of a spatialpandas DataFrame.",
              cls,
          )
      cols = list(
          unique_iterator(
              [
                  columns.index(geom_col)
                  if c in geom_dims
                  else columns.index(c)
                  for c in cols
              ]
          )
      )
  
      if not isinstance(dataset.data[geom_col].dtype, MultiPointDtype):
          if scalar:
              return dataset.data.iloc[rows[0], cols[0]]
          elif isscalar(rows):
              rows = [rows]
          return dataset.data.iloc[rows, cols]
  
      geoms = dataset.data[geom_col]
      count = 0
      new_geoms, indexes = [], []
      for i, geom in enumerate(geoms):
          length = int(len(geom.buffer_values) / 2)
          if np.isscalar(rows):
              if count <= rows < (count + length):
                  idx = (rows - count) * 2
                  data = geom.buffer_values[idx : idx + 2]
                  new_geoms.append(type(geom)(data))
                  indexes.append(i)
                  break
          elif isinstance(rows, slice):
              if rows.start is not None and rows.start > (
                  count + length
              ):
                  continue
              elif rows.stop is not None and rows.stop < count:
                  break
              start = (
                  None
                  if rows.start is None
                  else max(rows.start - count, 0) * 2
              )
              stop = (
                  None
                  if rows.stop is None
                  else min(rows.stop - count, length) * 2
              )
              if rows.step is not None:
                  dataset.param.warning(
                      ".iloc step slicing currently not supported for"
                      "the multi-tabular data format."
                  )
              sliced = geom.buffer_values[start:stop]
              if len(sliced):
                  indexes.append(i)
                  new_geoms.append(type(geom)(sliced))
          else:
              sub_rows = [
                  v
                  for r in rows
                  for v in ((r - count) * 2, (r - count) * 2 + 1)
                  if count <= r < (count + length)
              ]
              if sub_rows:
                  indexes.append(i)
                  idxs = np.array(sub_rows, dtype=int)
                  new_geoms.append(type(geom)(geom.buffer_values[idxs]))
          count += length
  
      new = dataset.data.iloc[indexes].copy()
      new[geom_col] = GeoSeries(new_geoms)
      return new
  
imports: import sys
  from collections import defaultdict
  import numpy
  import pandas
  from ..dimension import dimension_name
  from ..util import isscalar, unique_array, unique_iterator
  from .interface import DataError, Interface
  from .multipath import MultiInterface, ensure_ring
  from .pandas import PandasInterface
label_desc: Use image node_id 29 for calling the SpatialPandasInterface obj's underlying member method code with example usage: obj.iloc(cls, dataset, index) and returns: new, dataset, dataset