code: def exclude_alpha(func):
      """Exclude the alpha channel from the DataArray before further processing."""
  
      @wraps(func)
      def wrapper(data, **kwargs):
          bands = data.coords["bands"].values
          exclude = ["A"] if "A" in bands else []
          band_data = data.sel(
              bands=[b for b in bands if b not in exclude]
          )
          band_data = func(band_data, **kwargs)
  
          attrs = data.attrs
          attrs.update(band_data.attrs)
          # combine the new data with the excluded data
          new_data = xr.concat(
              [band_data, data.sel(bands=exclude)], dim="bands"
          )
          data.data = new_data.sel(bands=bands).data
          data.attrs = attrs
          return data
  
      return wrapper
  
imports: import logging
  import os
  from collections import namedtuple
  from functools import wraps
  from numbers import Number
  from typing import Optional
  import dask
  import dask.array
  import numpy
  import xarray
  from trollimage.colormap import Colormap
  from trollimage.xrimage import XRImage
  from satpy._compat import ArrayLike
  from satpy._config import get_config_path
  from satpy.utils import find_in_ancillary
label_desc: Use image node_id 4 for calling a global function with example usage: exclude_alpha(func) and returns: wrapper, data