code: def test_error(tmpdir, runner):
      outputname = str(tmpdir.join("stacked.tif"))
      result = runner.invoke(
          main_group,
          [
              "stack",
              "tests/data/RGB.byte.tif",
              outputname,
              "--driver",
              "BOGUS",
          ],
      )
      assert result.exit_code == 1
  
file_path: rasterio/tests/test_rio_stack.py
imports: import rasterio
  from rasterio.rio.main import main_group
label_desc: Use image node_id 6 for calling a global function with example usage: test_error(tmpdir, runner) without return types