code: def get_data(self, element, ranges, style):
      data, style, axis_kwargs = super().get_data(
          element, ranges, style
      )
      rects, labels = [], []
  
      label_dim = element.nodes.get_dimension(self.label_index)
      labels = self.labels
      if label_dim and labels:
          if self.label_index not in [2, None]:
              self.param.warning(
                  "Cannot declare style mapping for 'labels' option "
                  "and declare a label_index; ignoring the label_index."
              )
      elif label_dim:
          labels = label_dim
      if isinstance(labels, str):
          labels = element.nodes.get_dimension(labels)
  
      if labels is None:
          text = []
      if isinstance(labels, dim):
          text = labels.apply(element, flat=True)
      else:
          text = element.nodes.dimension_values(labels)
          text = [labels.pprint_value(v) for v in text]
  
      value_dim = element.vdims[0]
      text_labels = []
      for i, node in enumerate(element._sankey["nodes"]):
          x0, x1, y0, y1 = (node[a + i] for a in "xy" for i in "01")
          rect = {"height": y1 - y0, "width": x1 - x0, "xy": (x0, y0)}
          rects.append(rect)
          if len(text):
              label = text[i]
          else:
              label = ""
          if self.show_values:
              value = value_dim.pprint_value(
                  node["value"], print_unit=True
              )
              if label:
                  label = f"{label} - {value}"
              else:
                  label = value
          if label:
              x = (
                  x1 + (x1 - x0) / 4.0
                  if self.label_position == "right"
                  else x0 - (x1 - x0) / 4.0
              )
              text_labels.append((label, (x, (y0 + y1) / 2.0)))
      data["rects"] = rects
      if text_labels:
          data["text"] = text_labels
      return data, style, axis_kwargs
  
file_path: holoviews/holoviews/plotting/mpl/sankey.py
imports: import param
  from matplotlib.collections import PatchCollection
  from matplotlib.patches import Rectangle
  from ...core.util import max_range
  from ...util.transform import dim
  from .graphs import GraphPlot
  from .util import filter_styles
label_desc: Use image node_id 2 for calling the SankeyPlot obj's underlying member method code with example usage: obj.get_data(element, ranges, style) and returns: data,  style,  axis_kwargs