code: def test_opener_fsspec_fs_write(tmp_path):
      """Use fsspec filesystem as opener for writing."""
      data = np.ma.masked_less_equal(
          np.array([[0, 1, 2]], dtype="uint8"), 1
      )
      fs = fsspec.filesystem("file")
      with rasterio.open(
          (tmp_path / "test.tif").as_posix(),
          "w",
          driver="GTiff",
          count=1,
          width=3,
          height=1,
          dtype="uint8",
          nodata=0,
          opener=fs.open,
      ) as dst:
          dst.write(data, indexes=1)
  
      # Expect the dataset's nodata value in the first two pixels.
      with rasterio.open(tmp_path / "test.tif") as src:
          assert src.mask_flag_enums == ([MaskFlags.nodata],)
          arr = src.read()
          assert list(arr.flatten()) == [0, 0, 2]
  
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 7 for calling a global function with example usage: test_opener_fsspec_fs_write(tmp_path) without return types