code: def test_no_append_driver_cannot_append(
      tmpdir, driver, testdata_generator, monkeypatch
  ):
      """Test if a driver that supports write and not append cannot also append."""
      monkeypatch.setitem(
          fiona.drvsupport.supported_drivers, driver, "raw"
      )
  
      if (
          driver == "FlatGeobuf"
          and get_gdal_version_num() == calc_gdal_version_num(3, 5, 0)
      ):
          pytest.skip("FlatGeobuf driver segfaults with gdal 3.5.0")
  
      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)
  
      try:
          with fiona.open(path, "a", driver=driver) as c:
              c.writerecords(records2)
      except Exception:
          log.exception("Caught exception in trying to append.")
          return
  
      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)
  
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 7 for calling a global function with example usage: test_no_append_driver_cannot_append(tmpdir, driver, testdata_generator, monkeypatch) without return types