code: def get_extents(
      self, element, ranges=None, range_type="combined", **kwargs
  ):
      extents = super().get_extents(element, ranges, range_type)
      if isinstance(element, HLines):
          extents = np.nan, extents[0], np.nan, extents[2]
      elif isinstance(element, VLines):
          extents = extents[0], np.nan, extents[2], np.nan
      elif isinstance(element, HSpans):
          extents = pd.array(extents)
          extents = np.nan, extents[:2].min(), np.nan, extents[2:].max()
      elif isinstance(element, VSpans):
          extents = pd.array(extents)
          extents = extents[:2].min(), np.nan, extents[2:].max(), np.nan
      return extents
  
imports: import matplotlib
  import numpy
  import pandas
  import param
  from matplotlib import patches
  from matplotlib.lines import Line2D
  from ...core.options import abbreviated_exception
  from ...core.util import match_spec
  from ...element import HLines, HSpans, VLines, VSpans
  from .element import ColorbarPlot, ElementPlot
  from .plot import mpl_rc_context
label_desc: Use image node_id 2 for calling the _SyntheticAnnotationPlot obj's underlying member method code with example usage: obj.get_extents(element, ranges, range_type) and returns: extents