code: def _process_data(*kwarg_names):
      """Helper function to handle data keyword argument"""
  
      def _data_decorator(func):
          @functools.wraps(func)
          def _mark_with_data(*args, **kwargs):
              data = kwargs.pop("data", None)
              if data is None:
                  return func(*args, **kwargs)
              else:
                  data_args = [
                      data[i] if hashable(data, i) else i for i in args
                  ]
                  data_kwargs = {
                      kw: data[kwargs[kw]]
                      if hashable(data, kwargs[kw])
                      else kwargs[kw]
                      for kw in set(kwarg_names).intersection(
                          list(kwargs.keys())
                      )
                  }
                  try:
                      # if any of the plots want to use the index_data, they can
                      # use it by referring to this attribute.
                      data_kwargs["index_data"] = data.index
                  except AttributeError:
                      pass
                  kwargs_update = kwargs.copy()
                  kwargs_update.update(data_kwargs)
                  return func(*data_args, **kwargs_update)
  
          return _mark_with_data
  
      return _data_decorator
  
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 5 for calling a global function with example usage: _process_data() and returns: _data_decorator, _mark_with_data, func, func