code: def check_is_dataarray(comp):
      r
  
      @wraps(comp)
      def func(data_array, *args, **kwds):
          assert isinstance(data_array, xr.DataArray)
          return comp(data_array, *args, **kwds)
  
      return func
docs: r"""Decorator to check that a computation has an instance of xarray.DataArray
       as first argument.