code: def test_complex_int16(tmpdir):
      """A cint16 dataset can be created"""
      import numpy as np
      import rasterio
      from rasterio.transform import Affine
  
      x = np.linspace(-4.0, 4.0, 240)
      y = np.linspace(-3.0, 3.0, 180)
      X, Y = np.meshgrid(x, y)
      Z1 = np.ones_like(X) + 1j
  
      res = (x[-1] - x[0]) / 240.0
      transform1 = Affine.translation(
          x[0] - res / 2, y[-1] - res / 2
      ) * Affine.scale(res, -res)
  
      tempfile = str(tmpdir.join("test.tif"))
  
      with rasterio.open(
          tempfile,
          "w",
          driver="GTiff",
          height=Z1.shape[0],
          width=Z1.shape[1],
          nodata=None,
          count=1,
          dtype="complex_int16",
          crs="+proj=latlong",
          transform=transform1,
      ) as dst:
          dst.write(Z1, 1)
  
      assert "Type=CInt16" in subprocess.check_output(
          ["gdalinfo", tempfile]
      ).decode("utf-8")
  
      with rasterio.open(tempfile) as dst:
          assert dst.nodatavals == (None,)
          data = dst.read()
          assert data.dtype == np.complex64
  
file_path: rasterio/tests/test_complex_dtypes.py
imports: import subprocess
  import uuid
  import numpy
  import pytest
  import rasterio
label_desc: Use image node_id 5 for calling a global function with example usage: test_complex_int16(tmpdir) without return types