code: def test_stats():
      with rasterio.open("tests/data/RGB.byte.tif") as src:
          results = stats((src, 1))
          assert results[0] == 0
          assert results[1] == 255
          assert np.isclose(results[2], 29.9477)
  
          results2 = stats(src.read(1))
          assert np.allclose(np.array(results), np.array(results2))
  
file_path: rasterio/tests/test_rio_insp.py
imports: import numpy
  import pytest
  import rasterio
  from rasterio.rio.main import main_group
  from rasterio.rio.insp import stats
label_desc: Use image node_id 4 for calling a global function with example usage: test_stats() without return types