code: def test_write_sbyte(tmpdir):
      name = str(tmpdir.mkdir("sub").join("test_write_sbyte.tif"))
      a = np.ones((100, 100), dtype=rasterio.sbyte) * -33
      with rasterio.open(
          name,
          "w",
          driver="GTiff",
          width=100,
          height=100,
          count=1,
          dtype=a.dtype,
      ) as dst:
          dst.write(a, indexes=1)
  
      with rasterio.open(name) as dst:
          assert (dst.read() == -33).all()
  
      info = subprocess.check_output(
          ["gdalinfo", "-stats", name]
      ).decode("utf-8")
      assert (
          "Minimum=-33.000, Maximum=-33.000, Mean=-33.000, StdDev=0.000"
          in info
      )
      if gdal_version < GDALVersion(3, 7):
          assert "SIGNEDBYTE" in info
      else:
          assert "Int8" in info
  
imports: import logging
  import re
  from pathlib import Path
  import subprocess
  import affine
  import numpy
  import pytest
  from .conftest import requires_gdal35, gdal_version
  import rasterio
  from rasterio.drivers import blacklist
  from rasterio.enums import MaskFlags, Resampling
  from rasterio.env import Env, GDALVersion
  from rasterio.errors import RasterioIOError
label_desc: Use image node_id 8 for calling a global function with example usage: test_write_sbyte(tmpdir) without return types