code: def nonzero(cls, dataset):
      # Make an empty query to see if a row is returned.
      if ibis4():
          return bool(len(dataset.data.head(1).execute()))
      else:
          return bool(len(dataset.data[[]].head(1).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 9 for calling the IbisInterface obj's underlying member method code with example usage: obj.nonzero(cls, dataset) and returns: bool, bool