code: def test_read_multilayer_memoryfile(path_coutwildrnp_json, tmpdir):
      """Test read access to multilayer dataset in from file-like object"""
      with fiona.open(path_coutwildrnp_json, "r") as src:
          schema = src.schema
          features = list(src)
  
      path = os.path.join(tmpdir, "test.gpkg")
      with fiona.open(
          path, "w", driver="GPKG", schema=schema, layer="layer1"
      ) as dst:
          dst.writerecords(features[0:5])
      with fiona.open(
          path, "w", driver="GPKG", schema=schema, layer="layer2"
      ) as dst:
          dst.writerecords(features[5:])
  
      with open(path, "rb") as f:
          with fiona.open(f, layer="layer1") as src:
              assert src.name == "layer1"
              assert len(src) == 5
      # Bug reported in #781 where this next section would fail
      with open(path, "rb") as f:
          with fiona.open(f, layer="layer2") as src:
              assert src.name == "layer2"
              assert len(src) == 62
  
imports: import os
  from io import BytesIO
  import pytest
  import fiona
  from fiona import supported_drivers
  from fiona.drvsupport import _driver_supports_mode
  from fiona.errors import DriverError
  from fiona.io import MemoryFile, ZipMemoryFile
  from fiona.meta import supports_vsi
  from .conftest import requires_gdal2, requires_gpkg
label_desc: Use image node_id 28 for calling a global function with example usage: test_read_multilayer_memoryfile(path_coutwildrnp_json, tmpdir) without return types