class_docstr: Interface for simple dictionary-based dataset format. The dictionary
  keys correspond to the column (i.e. dimension) names and the values
  are collections representing the values in that column.
class_docstr_tok: ["Interface","for","simple","dictionary-based","dataset","format",".","The","dictionary","keys","correspond","to","the","column","(","i.e",".","dimension",")","names","and","the","values","are","collections","representing","the","values","in","that","column","."]
code: def sample(cls, dataset, samples=None):
      if samples is None:
          samples = []
      mask = False
      for sample in samples:
          sample_mask = True
          if isscalar(sample):
              sample = [sample]
          for i, v in enumerate(sample):
              name = dataset.get_dimension(i).name
              sample_mask &= dataset.data[name] == v
          mask |= sample_mask
      return {
          k: col if isscalar(col) else np.array(col)[mask]
          for k, col in dataset.data.items()
      }
  
imports: from collections import OrderedDict, defaultdict
  import numpy
  from ..None import util
  from ..dimension import dimension_name
  from ..element import Element
  from ..ndmapping import NdMapping, item_check, sorted_context
  from ..util import isscalar
  from .interface import DataError, Interface
label_desc: Use image node_id 20 for calling the DictInterface obj's underlying member method code with example usage: obj.sample(cls, dataset, samples) and returns: unknown