code: def _fetch_axis(fig, dimension, scale):
      # Internal utility function.
      # Given a figure instance `fig`, the dimension of the scaled attribute and
      # the instance of a scale, returns the axis if an axis is present for that
      # combination. Else returns `None`
      axis_registry = getattr(fig, "axis_registry", {})
      dimension_data = axis_registry.get(dimension, [])
      dimension_scales = [dim["scale"] for dim in dimension_data]
      dimension_axes = [dim["axis"] for dim in dimension_data]
      try:
          return dimension_axes[dimension_scales.index(scale)]
      except (ValueError, IndexError):
          return None
  
imports: import sys
  from collections import OrderedDict
  from IPython.display import display
  from ipywidgets import Image
  from numpy import arange, issubdtype, array, column_stack, shape
  from .figure import Figure
  from bqscales import Scale, LinearScale, Mercator
  from .axes import Axis
  from .marks import Lines, Scatter, Hist, Bars, OHLC, Pie, Map, Image, Label, HeatMap, GridHeatMap, topo_load, Boxplot, Bins
  from .interacts import BrushIntervalSelector, FastIntervalSelector, BrushSelector, IndexSelector, MultiSelector, LassoSelector
  from traitlets.utils.sentinel import Sentinel
  import functools
label_desc: Use image node_id 50 for calling a global function with example usage: _fetch_axis(fig, dimension, scale) and returns: dimension_axes, None