code: def get_data(self, element, ranges, style):
      if isinstance(element, Polygons):
          color_prop = "facecolors"
          subpaths = polygons_to_path_patches(element)
          paths = [path for subpath in subpaths for path in subpath]
          if self.invert_axes:
              for p in paths:
                  p._path.vertices = p._path.vertices[:, ::-1]
      else:
          color_prop = "colors"
          paths = element.split(
              datatype="array", dimensions=element.kdims
          )
          if self.invert_axes:
              paths = [p[:, ::-1] for p in paths]
  
      # Process style transform
      with abbreviated_exception():
          style = self._apply_transforms(element, ranges, style)
  
      if "c" in style:
          style["array"] = style.pop("c")
          style["clim"] = style.pop("vmin"), style.pop("vmax")
      elif isinstance(style.get("color"), np.ndarray):
          style[color_prop] = style.pop("color")
  
      # Process deprecated color_index
      if "array" not in style:
          cidx = (
              self.color_index + 2
              if isinstance(self.color_index, int)
              else self.color_index
          )
          cdim = element.get_dimension(cidx)
      else:
          cdim = None
  
      if cdim is None:
          return (paths,), style, {}
  
      array = element.dimension_values(cdim, expanded=False)
      if len(paths) != len(array):
          # If there are multi-geometries the list of scalar values
          # will not match the list of paths and has to be expanded
          array = np.array(
              [
                  v
                  for v, sps in zip(array, subpaths)
                  for _ in range(len(sps))
              ]
          )
  
      if array.dtype.kind not in "uif":
          array = util.search_indices(array, util.unique_array(array))
      style["array"] = array
      self._norm_kwargs(element, ranges, style, cdim)
      return (paths,), style, {}
  
file_path: holoviews/holoviews/plotting/mpl/path.py
imports: import numpy
  import param
  from matplotlib.collections import LineCollection, PatchCollection
  from matplotlib.dates import DateFormatter, date2num
  from ...core import util
  from ...core.dimension import Dimension
  from ...core.options import abbreviated_exception
  from ...element import Polygons
  from .element import ColorbarPlot
  from .util import polygons_to_path_patches
label_desc: Use image node_id 1 for calling the ContourPlot obj's underlying member method code with example usage: obj.get_data(element, ranges, style) and returns: paths,  style,  dict, paths,  style,  dict