code: def validate(cls, dataset, vdims=True):
      dim_types = "key" if vdims else "all"
      geom_dims = cls.geom_dims(dataset)
      if len(geom_dims) > 0 and len(geom_dims) != 2:
          raise DataError(
              "Expected %s instance to declare two key "
              "dimensions corresponding to the geometry "
              "coordinates but %d dimensions were found "
              "which did not refer to any columns."
              % (type(dataset).__name__, len(geom_dims)),
              cls,
          )
      not_found = [
          d.name
          for d in dataset.dimensions(dim_types)
          if d not in geom_dims and d.name 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
  from collections import defaultdict
  import numpy
  import pandas
  from holoviews.core.util import isscalar, unique_iterator, unique_array
  from holoviews.core.data import Dataset, Interface, MultiInterface, PandasAPI
  from holoviews.core.data.interface import DataError
  from holoviews.core.data import PandasInterface
  from holoviews.core.data.spatialpandas import get_value_array
  from holoviews.core.dimension import dimension_name
  from holoviews.element import Path
  from ..util import asarray, geom_to_array, geom_types, geom_length
  from .geom_dict import geom_from_dict
label_desc: Use image node_id 5 for calling the GeoPandasInterface obj's underlying member method code with example usage: obj.validate(cls, dataset, vdims) without return types