code: def test_default_can_read_and_can_write(tmp_path):
      F = imageio.plugins.example.DummyFormat(
          "test", "", "foo bar", "v"
      )
  
      # Prepare files
      filename1 = str(tmp_path / "test")
      open(filename1 + ".foo", "wb")
      open(filename1 + ".bar", "wb")
      open(filename1 + ".spam", "wb")
  
      # Test _can_read()
      assert F.can_read(Request(filename1 + ".foo", "rv"))
      assert F.can_read(Request(filename1 + ".bar", "r?"))
      assert not F.can_read(Request(filename1 + ".spam", "r?"))
  
      # Test _can_write()
      assert F.can_write(Request(filename1 + ".foo", "wv"))
      assert F.can_write(Request(filename1 + ".bar", "w?"))
      assert not F.can_write(Request(filename1 + ".spam", "w?"))
  
imports: import gc
  import shutil
  from pathlib import Path
  import sys
  from typing import List
  import imageio
  import imageio
  import numpy
  import pytest
  from imageio.core import Format, FormatManager, Request
  from pytest import raises
  from conftest import deprecated_test
label_desc: Use image node_id 4 for calling a global function with example usage: test_default_can_read_and_can_write(tmp_path) without return types