code: def test_remove(tmpdir, kind, driver, specify_driver):
      """Test various dataset removal operations"""
      extension = {"ESRI Shapefile": "shp", "GeoJSON": "json"}[driver]
      filename = f"delete_me.{extension}"
      output_filename = str(tmpdir.join(filename))
  
      create_sample_data(output_filename, driver=driver)
      if kind == "collection":
          to_delete = fiona.open(output_filename, "r")
      else:
          to_delete = output_filename
  
      assert os.path.exists(output_filename)
      if specify_driver:
          fiona.remove(to_delete, driver=driver)
      else:
          fiona.remove(to_delete)
      assert not os.path.exists(output_filename)
  
file_path: Fiona/tests/test_remove.py
imports: import logging
  import sys
  import os
  import itertools
  from .conftest import requires_gpkg
  import pytest
  import fiona
  from fiona.errors import DatasetDeleteError
  from fiona.model import Feature
label_desc: Use image node_id 2 for calling a global function with example usage: test_remove(tmpdir, kind, driver, specify_driver) without return types