code: def validate(cls, dataset, vdims=True):
      dims = "all" if vdims else "key"
      not_found = [
          d
          for d in dataset.dimensions(dims, label="name")
          if d not in dataset.data
      ]
      if not_found:
          raise DataError(
              "Supplied data does not contain specified "
              "dimensions, the following dimensions were "
              "not found: %s" % repr(not_found),
              cls,
          )
  
imports: import sys
  import warnings
  import numpy
  import param
  from ..None import util
  from ..element import Element
  from ..ndmapping import NdMapping
  from .util import finite_range
label_desc: Use image node_id 7 for calling the Interface obj's underlying member method code with example usage: obj.validate(cls, dataset, vdims) without return types