code: def test_wplus_transform(tmpdir):
      """Transform is set on a new dataset created in w+ mode (see issue #1359)"""
      name = str(tmpdir.join("test.tif"))
      transform = affine.Affine.translation(
          10.0, 10.0
      ) * affine.Affine.scale(0.5, -0.5)
      with rasterio.open(
          name,
          "w+",
          driver="GTiff",
          crs="epsg:4326",
          transform=transform,
          height=10,
          width=10,
          count=1,
          dtype="uint8",
      ) as dst:
          dst.write(np.ones((1, 10, 10), dtype="uint8"))
          assert dst.transform == transform
  
imports: import logging
  import re
  from pathlib import Path
  import subprocess
  import affine
  import numpy
  import pytest
  from .conftest import requires_gdal35, gdal_version
  import rasterio
  from rasterio.drivers import blacklist
  from rasterio.enums import MaskFlags, Resampling
  from rasterio.env import Env, GDALVersion
  from rasterio.errors import RasterioIOError
label_desc: Use image node_id 23 for calling a global function with example usage: test_wplus_transform(tmpdir) without return types