code: def test_write_noncontiguous(tmpdir):
      name = str(tmpdir.join("test_write_nodata.tif"))
      ROWS = 4
      COLS = 10
      BANDS = 6
      # Create a 3-D random int array (rows, columns, bands)
      total = ROWS * COLS * BANDS
      arr = (
          np.random.randint(0, 10, size=total)
          .reshape((ROWS, COLS, BANDS), order="F")
          .astype(np.int32)
      )
      kwargs = {
          "driver": "GTiff",
          "width": COLS,
          "height": ROWS,
          "count": BANDS,
          "dtype": rasterio.int32,
      }
      with rasterio.open(name, "w", **kwargs) as dst:
          for i in range(BANDS):
              dst.write(arr[:, :, i], indexes=i + 1)
  
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 20 for calling a global function with example usage: test_write_noncontiguous(tmpdir) without return types