code: def sample(cls, dataset, samples=None):
      if samples is None:
          samples = []
      names = [kd.name for kd in dataset.kdims]
      samples = [
          dataset.data.sel(**{k: [v] for k, v in zip(names, s)})
          .to_dataframe()
          .reset_index()
          for s in samples
      ]
      return pd.concat(samples)
  
imports: import sys
  import types
  import numpy
  import pandas
  from ..None import util
  from ..dimension import Dimension, asdim, dimension_name
  from ..element import Element
  from ..ndmapping import NdMapping, item_check, sorted_context
  from .grid import GridInterface
  from .interface import DataError, Interface
  from .util import dask_array_module, finite_range
label_desc: Use image node_id 26 for calling the XArrayInterface obj's underlying member method code with example usage: obj.sample(cls, dataset, samples) and returns: pd