class_docstr: Test NIR reflectance compositor.
docstr: Test NIR reflectance compositor provided sunz and a sunz threshold.
docstr_tok: ["Test","NIR","reflectance","compositor","provided","sunz","and","a","sunz","threshold","."]
code: def test_provide_sunz_and_threshold(
      self, calculator, apply_modifier_info, sza
  ):
      """Test NIR reflectance compositor provided sunz and a sunz threshold."""
      calculator.return_value = mock.MagicMock(
          reflectance_from_tbs=self.refl_from_tbs
      )
      from satpy.modifiers.spectral import NIRReflectance
  
      sza.return_value = self.da_sunz
  
      comp = NIRReflectance(name="test", sunz_threshold=84.0)
      info = {"modifiers": None}
      res = comp(
          [self.nir, self.ir_], optional_datasets=[self.sunz], **info
      )
  
      assert res.attrs["sun_zenith_threshold"] == 84.0
      calculator.assert_called_with(
          "Meteosat-11",
          "seviri",
          "IR_039",
          sunz_threshold=84.0,
          masking_limit=NIRReflectance.MASKING_LIMIT,
      )
  
imports: import unittest
  from datetime import datetime
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from pyresample.geometry import AreaDefinition, StackedAreaDefinition
  from pytest_lazyfixture import lazy_fixture
label_desc: Use image node_id 6 for calling the TestNIRReflectance obj's underlying member method code with example usage: obj.test_provide_sunz_and_threshold(calculator, apply_modifier_info, sza) without return types