code: def test_write_blacklist(tmpdir, driver):
      # Skip if we don't have driver support built in.
      with Env() as env:
          if driver not in env.drivers():
              pytest.skip()
  
      name = str(tmpdir.join("data.test"))
      with pytest.raises(RasterioIOError) as exc_info:
          rasterio.open(
              name,
              "w",
              driver=driver,
              width=100,
              height=100,
              count=1,
              dtype="uint8",
          )
      exc = str(exc_info.value)
      assert exc.startswith("Blacklisted")
  
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 21 for calling a global function with example usage: test_write_blacklist(tmpdir, driver) without return types