docstr: Return the extents of the Sankey box
docstr_tok: ["Return","the","extents","of","the","Sankey","box"]
code: def get_extents(
      self, element, ranges, range_type="combined", **kwargs
  ):
      """Return the extents of the Sankey box"""
      if range_type == "extents":
          return element.nodes.extents
      xdim, ydim = element.nodes.kdims[:2]
      xpad = 0.05 if self.label_index is None else 0.25
      x0, x1 = ranges[xdim.name][range_type]
      y0, y1 = ranges[ydim.name][range_type]
      xdiff = x1 - x0
      ydiff = y1 - y0
  
      if self.label_position in ["right", "outer"]:
          x1 = x1 + xpad * xdiff
      else:  # ['left', 'inner']
          x1 = x1 + (0.05 * xdiff)
  
      if self.label_position in ["left", "outer"]:
          x0 = x0 - xpad * xdiff
      else:  # ['right', 'inner']
          x0 = x0 - (0.05 * xdiff)
  
      x0, x1 = max_range([xdim.range, (x0, x1)])
      y0, y1 = max_range(
          [ydim.range, (y0 - (0.05 * ydiff), y1 + (0.05 * ydiff))]
      )
  
      return (x0, y0, x1, y1)
  
file_path: holoviews/holoviews/plotting/bokeh/sankey.py
imports: import numpy
  import param
  from bokeh.models import Patches
  from ...core.data import Dataset
  from ...core.util import dimension_sanitizer, max_range
  from ...util.transform import dim
  from .graphs import GraphPlot
label_desc: Use image node_id 9 for calling the SankeyPlot obj's underlying member method code with example usage: obj.get_extents(element, ranges, range_type) and returns: x0,  y0,  x1,  y1, element