code: def test_warning(tmpdir, caplog):
      """Be warned about invalid creation options"""
      profile = DefaultGTiffProfile(
          count=1,
          height=256,
          width=256,
          compression="lolwut",
          foo="bar",
      )
  
      with rasterio.Env(GDAL_VALIDATE_CREATION_OPTIONS=True):
          rasterio.open(str(tmpdir.join("test.tif")), "w", **profile)
  
      assert set(
          [
              "CPLE_NotSupported in driver GTiff does not support creation option COMPRESSION",
              "CPLE_NotSupported in driver GTiff does not support creation option FOO",
          ]
      ) <= set(
          [
              rec.message
              for rec in caplog.records
              if rec.levelno == logging.WARNING
              and rec.name == "rasterio._env"
          ]
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_warning(tmpdir, caplog) without return types