code: def test_registration_failure():
      """Exception is raised on attempt to register a second opener for a filename and mode."""
      with pytest.raises(OpenerRegistrationError) as exc_info:
          with rasterio.open(
              "tests/data/RGB.byte.tif", opener=io.open
          ) as a, rasterio.open(
              "tests/data/RGB.byte.tif", opener=int
          ) as b:
              pass
  
      assert (
          exc_info.value.args[0]
          == "Opener already registered for urlpath and mode"
      )
  
file_path: rasterio/tests/test_pyopener.py
imports: import zipfile
  import io
  import fsspec
  import numpy
  import pytest
  import rasterio
  from rasterio.enums import MaskFlags
  from rasterio.errors import RasterioIOError, OpenerRegistrationError
label_desc: Use image node_id 1 for calling a global function with example usage: test_registration_failure() without return types