code: def test_rebuild_ls(data, runner):
      inputfile = str(data.join("RGB.byte.tif"))
  
      result = runner.invoke(
          cli,
          [
              "overview",
              inputfile,
              "--build",
              "2,4,8",
              "--resampling",
              "cubic",
          ],
      )
      assert result.exit_code == 0
  
      result = runner.invoke(cli, ["overview", inputfile, "--rebuild"])
      assert result.exit_code == 0
  
      result = runner.invoke(cli, ["overview", inputfile, "--ls"])
      assert result.exit_code == 0
  
      expected = "  Band 1: [2, 4, 8] (method: 'cubic')\n  Band 2: [2, 4, 8] (method: 'cubic')\n  Band 3: [2, 4, 8] (method: 'cubic')\n"
      assert result.output.endswith(expected)
  
file_path: rasterio/tests/test_rio_overview.py
imports: import logging
  import sys
  import pytest
  from rasterio.rio.main import main_group
  from rasterio.rio.overview import get_maximum_overview_level
label_desc: Use image node_id 5 for calling a global function with example usage: test_rebuild_ls(data, runner) without return types