code: def indexed(cls, dataset, selection):
          
          selected = list(selection.keys())
          all_scalar = all((not isinstance(sel, (tuple, slice, set, list))
                            and not callable(sel)) for sel in selection.values())
          all_kdims = all(d in selected for d in dataset.kdims)
          return all_scalar and all_kdims
docs: Given a Dataset object and selection to be applied returns
          boolean to indicate whether a scalar value has been indexed.