code: def test_remove_layer(tmpdir):
      filename = str(tmpdir.join("a_filename.gpkg"))
      create_sample_data(filename, "GPKG", layer="layer1")
      create_sample_data(filename, "GPKG", layer="layer2")
      assert fiona.listlayers(filename) == ["layer1", "layer2"]
  
      result = CliRunner().invoke(
          main_group, ["rm", filename, "--layer", "layer2", "--yes"]
      )
      assert result.exit_code == 0
      assert os.path.exists(filename)
      assert fiona.listlayers(filename) == ["layer1"]
  
file_path: Fiona/tests/test_fio_rm.py
imports: import os
  import pytest
  from click.testing import CliRunner
  import fiona
  from fiona.model import Feature
  from fiona.fio.main import main_group
label_desc: Use image node_id 3 for calling a global function with example usage: test_remove_layer(tmpdir) without return types