code: def select_mask(cls, dataset, selection):
      import ibis
  
      predicates = []
      for dim, object in selection.items():
          if isinstance(object, tuple):
              object = slice(*object)
          alias = dataset.get_dimension(dim).name
          column = dataset.data[alias]
          if isinstance(object, slice):
              if object.start is not None:
                  # Workaround for dask issue #3392
                  bound = util.numpy_scalar_to_python(object.start)
                  predicates.append(bound <= column)
              if object.stop is not None:
                  bound = util.numpy_scalar_to_python(object.stop)
                  predicates.append(column < bound)
          elif isinstance(object, (set, list)):
              # rowid conditions
              condition = None
              for id in object:
                  predicate = column == id
                  condition = (
                      predicate
                      if condition is None
                      else condition | predicate
                  )
              if condition is not None:
                  predicates.append(condition)
          elif callable(object):
              predicates.append(object(column))
          elif isinstance(object, ibis.Expr):
              predicates.append(object)
          else:
              predicates.append(column == object)
      return predicates
  
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 25 for calling the IbisInterface obj's underlying member method code with example usage: obj.select_mask(cls, dataset, selection) and returns: predicates