code: def sample(cls, dataset, samples=None):
      if samples is None:
          samples = []
      data = dataset.data
      mask = None
      for sample in samples:
          sample_mask = None
          if np.isscalar(sample):
              sample = [sample]
          for i, v in enumerate(sample):
              submask = data.iloc[:, i] == v
              if sample_mask is None:
                  sample_mask = submask
              else:
                  sample_mask &= submask
          if mask is None:
              mask = sample_mask
          else:
              mask |= sample_mask
      return data[mask]
  
imports: import numpy
  import pandas
  from packaging.version import Version
  from pandas.api.types import is_numeric_dtype
  from ..None import util
  from ..dimension import Dimension, dimension_name
  from ..element import Element
  from ..ndmapping import NdMapping, item_check, sorted_context
  from .interface import DataError, Interface
  from .util import finite_range
label_desc: Use image node_id 17 for calling the PandasInterface obj's underlying member method code with example usage: obj.sample(cls, dataset, samples) and returns: data