code: def sample(cls, dataset, samples=None):
      if samples is None:
          samples = []
      data = dataset.data
      mask = False
      for sample in samples:
          sample_mask = True
          if np.isscalar(sample):
              sample = [sample]
          for i, v in enumerate(sample):
              sample_mask &= data[:, i] == v
          mask |= sample_mask
  
      return data[mask]
  
imports: import numpy
  from ..None import util
  from ..dimension import dimension_name
  from ..element import Element
  from ..ndmapping import NdMapping, item_check, sorted_context
  from .interface import DataError, Interface
label_desc: Use image node_id 14 for calling the ArrayInterface obj's underlying member method code with example usage: obj.sample(cls, dataset, samples) and returns: data