code: def metaArrayWrapper(fn):
      def newFn(self, data, *args, **kargs):
          if HAVE_METAARRAY and (
              hasattr(data, "implements")
              and data.implements("MetaArray")
          ):
              d1 = fn(self, data.view(np.ndarray), *args, **kargs)
              info = data.infoCopy()
              if d1.shape != data.shape:
                  for i in range(data.ndim):
                      if "values" in info[i]:
                          info[i]["values"] = info[i]["values"][
                              : d1.shape[i]
                          ]
              return metaarray.MetaArray(d1, info=info)
          else:
              return fn(self, data, *args, **kargs)
  
      return newFn
  
imports: import numpy
  from ...Qt import QtCore, QtWidgets
  from ...WidgetGroup import WidgetGroup
  from ...widgets.ColorButton import ColorButton
  from ...widgets.SpinBox import SpinBox
  from ..Node import Node
label_desc: Use image node_id 2 for calling a global function with example usage: metaArrayWrapper(fn) and returns: newFn, metaarray, fn