code: def test_dtype_rescaling_uint8_full(tmpdir, runner):
      """Rescale uint8 [0, 255] to uint8 [0, 255]"""
      outputname = str(tmpdir.join("test.tif"))
      result = runner.invoke(
          main_group,
          [
              "convert",
              "tests/data/RGB.byte.tif",
              outputname,
              "--scale-ratio",
              "1.0",
          ],
      )
      assert result.exit_code == 0
  
      src_stats = [
          {"max": 255.0, "mean": 44.434478650699106, "min": 1.0},
          {"max": 255.0, "mean": 66.02203484105824, "min": 1.0},
          {"max": 255.0, "mean": 71.39316199120559, "min": 1.0},
      ]
  
      with rasterio.open(outputname) as src:
          for band, expected in zip(src.read(masked=True), src_stats):
              assert round(band.min() - expected["min"], 6) == 0.0
              assert round(band.max() - expected["max"], 6) == 0.0
              assert round(band.mean() - expected["mean"], 6) == 0.0
  
file_path: rasterio/tests/test_rio_convert.py
imports: import pytest
  import rasterio
  from rasterio.rio.main import main_group
label_desc: Use image node_id 7 for calling a global function with example usage: test_dtype_rescaling_uint8_full(tmpdir, runner) without return types