code: def test_write_does_not_work_when_gdal_smaller_mingdal(
      tmpdir, driver, testdata_generator, monkeypatch
  ):
      """Test if driver really can't write for gdal < driver_mode_mingdal."""
      if driver == "BNA" and GDALVersion.runtime() < GDALVersion(2, 0):
          pytest.skip("BNA driver segfaults with gdal 1.11")
      if driver == "FlatGeobuf" and calc_gdal_version_num(
          3, 1, 0
      ) <= get_gdal_version_num() < calc_gdal_version_num(3, 1, 3):
          pytest.skip("See https://github.com/Toblerity/Fiona/pull/924")
  
      schema, crs, records1, _, _ = testdata_generator(
          driver, range(0, 10), []
      )
      path = str(tmpdir.join(get_temp_filename(driver)))
  
      if driver in driver_mode_mingdal[
          "w"
      ] and get_gdal_version_num() < calc_gdal_version_num(
          *driver_mode_mingdal["w"][driver]
      ):
          monkeypatch.delitem(
              fiona.drvsupport.driver_mode_mingdal["w"], driver
          )
  
          with pytest.raises(Exception):
              with fiona.open(
                  path, "w", driver=driver, crs=crs, schema=schema
              ) as c:
                  c.writerecords(records1)
  
file_path: Fiona/tests/test_drvsupport.py
imports: import logging
  import pytest
  from .conftest import requires_gdal24, get_temp_filename
  from fiona.drvsupport import supported_drivers, driver_mode_mingdal
  import fiona.drvsupport
  from fiona.env import GDALVersion
  from fiona._env import calc_gdal_version_num, get_gdal_version_num
  from fiona.errors import DriverError
label_desc: Use image node_id 3 for calling a global function with example usage: test_write_does_not_work_when_gdal_smaller_mingdal(tmpdir, driver, testdata_generator, monkeypatch) without return types