code: def test_multiband_calc(tmpdir, runner):
      outfile = str(tmpdir.join("out.tif"))
      result = runner.invoke(
          main_group,
          ["calc"]
          + [
              "(+ 125 (* 0.1 (read 1)))",
              "tests/data/shade.tif",
              outfile,
          ],
          catch_exceptions=False,
      )
      assert result.exit_code == 0
      with rasterio.open(outfile) as src:
          assert src.count == 1
          assert src.meta["dtype"] == "uint8"
          data = src.read(masked=True)
          assert data.min() == 125
          assert data.data[0][0][0] == 255
          assert data.mask[0][0][0]
  
file_path: rasterio/tests/test_rio_calc.py
imports: import pytest
  import rasterio
  from rasterio.rio.calc import _chunk_output
  from rasterio.rio.main import main_group
label_desc: Use image node_id 2 for calling a global function with example usage: test_multiband_calc(tmpdir, runner) without return types