code: def length(self, dataset):
      # Get the length by counting the length of an empty query.
      if ibis4():
          return dataset.data.count().execute()
      else:
          return dataset.data[[]].count().execute()
  
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 8 for calling the IbisInterface obj's underlying member method code with example usage: obj.length(dataset) and returns: dataset, dataset