code: def sample(cls, dataset, samples=[]):
          
          if len(samples[0]) == 1:
              select = {dataset.kdims[0].name: [s[0] for s in samples]}
              return tuple(dataset.select(**select).columns().values())
          return [c+(dataset.data[dataset._coord2matrix(c)],) for c in samples]
docs: Sample the Raster along one or both of its dimensions,
          returning a reduced dimensionality type, which is either
          a ItemTable, Curve or Scatter. If two dimension samples
          and a new_xaxis is provided the sample will be the value
          of the sampled unit indexed by the value in the new_xaxis
          tuple.