code: def sunzen_corr_cos(
      data: da.Array,
      cos_zen: da.Array,
      limit: float = 88.0,
      max_sza: Optional[float] = 95.0,
  ) -> da.Array:
      """Perform Sun zenith angle correction.
  
      The correction is based on the provided cosine of the zenith
      angle (``cos_zen``).  The correction is limited
      to ``limit`` degrees (default: 88.0 degrees).  For larger zenith
      angles, the correction is the same as at the ``limit`` if ``max_sza``
      is `None`. The default behavior is to gradually reduce the correction
      past ``limit`` degrees up to ``max_sza`` where the correction becomes
      0. Both ``data`` and ``cos_zen`` should be 2D arrays of the same shape.
  
      """
      return da.map_blocks(
          _sunzen_corr_cos_ndarray,
          data,
          cos_zen,
          limit,
          max_sza,
          meta=np.array((), dtype=data.dtype),
          chunks=data.chunks,
      )
  
imports: from __future__ import annotations
  import hashlib
  import os
  import shutil
  import warnings
  from datetime import datetime
  from functools import update_wrapper
  from glob import glob
  from typing import Any, Callable, Optional, Union
  import dask
  import numpy
  import xarray
  from dask import array
  from pyorbital.astronomy import cos_zen
  from pyorbital.astronomy import get_alt_az
  from pyorbital.orbital import get_observer_look
  from pyresample.geometry import AreaDefinition, StackedAreaDefinition, SwathDefinition
  import satpy
  from satpy.utils import PerformanceWarning, get_satpos, ignore_invalid_float_warnings
label_desc: Use image node_id 24 for calling a global function with example usage: sunzen_corr_cos(data, cos_zen, limit, max_sza) and returns: da