code: def run_crefl(
      refl,
      sensor_azimuth,
      sensor_zenith,
      solar_azimuth,
      solar_zenith,
      avg_elevation=None,
  ):
      """Run main crefl algorithm.
  
      All input parameters are per-pixel values meaning they are the same size
      and shape as the input reflectance data, unless otherwise stated.
  
      :param refl: tuple of reflectance band arrays
      :param sensor_azimuth: input swath sensor azimuth angle array
      :param sensor_zenith: input swath sensor zenith angle array
      :param solar_azimuth: input swath solar azimuth angle array
      :param solar_zenith: input swath solar zenith angle array
      :param avg_elevation: average elevation (usually pre-calculated and stored in CMGDEM.hdf)
  
      """
      runner_cls = _runner_class_for_sensor(refl.attrs["sensor"])
      runner = runner_cls(refl)
      corr_refl = runner(
          sensor_azimuth,
          sensor_zenith,
          solar_azimuth,
          solar_zenith,
          avg_elevation,
      )
      return corr_refl
  
imports: from __future__ import annotations
  import logging
  from typing import Optional, Type, Union
  import dask.array
  import numpy
  import xarray
  from satpy.dataset.dataid import WavelengthRange
label_desc: Use image node_id 1 for calling a global function with example usage: run_crefl(refl, sensor_azimuth, sensor_zenith, solar_azimuth, solar_zenith, avg_elevation) and returns: corr_refl