code: def _sunzen_reduction_ndarray(
      data: np.ndarray,
      sunz: np.ndarray,
      limit: float,
      max_sza: float,
      strength: float,
  ) -> np.ndarray:
      # compute reduction factor (0.0 - 1.0) between limit and maz_sza
      reduction_factor = (sunz - limit) / (max_sza - limit)
      reduction_factor = reduction_factor.clip(0.0, 1.0)
  
      # invert the reduction factor such that minimum reduction is done at `limit` and gradually increases towards max_sza
      with np.errstate(
          invalid="ignore"
      ):  # we expect space pixels to be invalid
          reduction_factor = 1.0 - np.log(
              reduction_factor + 1
          ) / np.log(2)
  
      # apply non-linearity to the reduction factor for a non-linear reduction of the signal. This can be used for a
      # slower or faster transision to higher/lower fractions at the ndvi extremes. If strength equals 1.0, this
      # operation has no effect on the reduction_factor.
      reduction_factor = reduction_factor**strength / (
          reduction_factor**strength
          + (1 - reduction_factor) ** strength
      )
  
      # compute final correction term, with no reduction for angles < limit
      corr = np.where(sunz < limit, 1.0, reduction_factor)
  
      # force "night" pixels to 0 (where SZA is invalid)
      corr[np.isnan(sunz)] = 0
  
      # reduce data signal with correction term
      res = data * corr
  
      return res
  
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 27 for calling a global function with example usage: _sunzen_reduction_ndarray(data, sunz, limit, max_sza, strength) and returns: res