code: def test_write_int8_mem(nodata):
      profile = {
          "driver": "GTiff",
          "width": 2,
          "height": 1,
          "count": 1,
          "dtype": "int8",
          "crs": "EPSG:3857",
          "transform": affine.Affine(10, 0, 0, 0, -10, 0),
          "nodata": nodata,
      }
  
      values = numpy.array([[nodata, nodata]], dtype="int8")
  
      with rasterio.open("/vsimem/test.tif", "w", **profile) as src:
          src.write(values, indexes=1)
  
      with rasterio.open("/vsimem/test.tif") as src:
          read = src.read(indexes=1)
          assert read[0][0] == nodata
          assert read[0][1] == nodata
  
file_path: rasterio/tests/test_int8.py
imports: import affine
  import numpy
  import pytest
  import rasterio
  from rasterio.env import GDALVersion
  from .conftest import gdal_version
label_desc: Use image node_id 1 for calling a global function with example usage: test_write_int8_mem(nodata) without return types