code: def test_append_does_not_work_when_gdal_smaller_mingdal(
      tmpdir, driver, testdata_generator, monkeypatch
  ):
      """Test if driver supports append mode."""
      if driver == "BNA" and GDALVersion.runtime() < GDALVersion(2, 0):
          pytest.skip("BNA driver segfaults with gdal 1.11")
  
      if driver == "FlatGeobuf" and GDALVersion.runtime() < GDALVersion(
          3, 5
      ):
          pytest.skip("FlatGeobuf segfaults with GDAL < 3.5.1")
  
      path = str(tmpdir.join(get_temp_filename(driver)))
      schema, crs, records1, records2, _ = testdata_generator(
          driver, range(0, 5), range(5, 10)
      )
  
      # If driver is not able to write, we cannot test append
      if driver in driver_mode_mingdal[
          "w"
      ] and get_gdal_version_num() < calc_gdal_version_num(
          *driver_mode_mingdal["w"][driver]
      ):
          return
  
      # Create test file to append to
      with fiona.open(
          path, "w", driver=driver, crs=crs, schema=schema
      ) as c:
          c.writerecords(records1)
  
      if driver in driver_mode_mingdal[
          "a"
      ] and get_gdal_version_num() < calc_gdal_version_num(
          *driver_mode_mingdal["a"][driver]
      ):
          # Test if driver really can't append for gdal < driver_mode_mingdal
          monkeypatch.delitem(
              fiona.drvsupport.driver_mode_mingdal["a"], driver
          )
  
          with pytest.raises(Exception):
              with fiona.open(path, "a", driver=driver) as c:
                  c.writerecords(records2)
  
              if driver in {"FileGDB", "OpenFileGDB"}:
                  open_driver = driver
              else:
                  open_driver = None
  
              with fiona.open(path, driver=open_driver) as collection:
                  assert collection.driver == driver
                  assert len(list(collection)) == len(records1) + len(
                      records2
                  )
  
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 5 for calling a global function with example usage: test_append_does_not_work_when_gdal_smaller_mingdal(tmpdir, driver, testdata_generator, monkeypatch) without return types