code: def _index_ibis_table(cls, data):
      import ibis
  
      if not cls.has_rowid():
          raise ValueError(
              "iloc expressions are not supported for ibis version %s."
              % ibis.__version__
          )
  
      if "hv_row_id__" in data.columns:
          return data
  
      if ibis4():
          return data.mutate(hv_row_id__=ibis.row_number())
      elif cls.is_rowid_zero_indexed(data):
          return data.mutate(hv_row_id__=data.rowid())
      else:
          return data.mutate(hv_row_id__=data.rowid() - 1)
  
imports: import sys
  from collections.abc import Iterable
  from functools import lru_cache
  import numpy
  from packaging.version import Version
  from ..None import util
  from ..element import Element
  from ..ndmapping import NdMapping, item_check, sorted_context
  from .None import pandas
  from .interface import Interface
  from .util import cached
label_desc: Use image node_id 17 for calling the IbisInterface obj's underlying member method code with example usage: obj._index_ibis_table(cls, data) and returns: data, data, data, data