code: def test_windows_exception(runner, path_rgb_byte_tif):
      """Tests the try/except that wraps the command logic.  The input file does
      not have 4 bands.
      """
      result = runner.invoke(
          main_group, ["blocks", path_rgb_byte_tif, "--bidx", 4]
      )
      assert result.exit_code == 2
      assert "Not a valid band index" in result.output
  
file_path: rasterio/tests/test_rio_blocks.py
imports: from itertools import zip_longest
  import json
  import re
  import numpy
  import rasterio
  from rasterio.warp import transform_bounds
  from rasterio.rio.main import main_group
label_desc: Use image node_id 7 for calling a global function with example usage: test_windows_exception(runner, path_rgb_byte_tif) without return types