code: def test_write_read_gcps(tmpdir):
      tiffname = str(tmpdir.join("test.tif"))
      gcps = [GroundControlPoint(1, 1, 100.0, 1000.0, z=0.0)]
  
      with rasterio.open(
          tiffname,
          "w",
          driver="GTiff",
          dtype="uint8",
          count=1,
          width=10,
          height=10,
          crs="epsg:4326",
          gcps=gcps,
      ) as dst:
          pass
  
      with rasterio.open(tiffname, "r+") as dst:
          gcps, crs = dst.gcps
          assert crs.to_epsg() == 4326
          assert len(gcps) == 1
          point = gcps[0]
          assert (1, 1) == (point.row, point.col)
          assert (100.0, 1000.0, 0.0) == (point.x, point.y, point.z)
  
          dst.gcps = [
              GroundControlPoint(1, 1, 100.0, 1000.0, z=0.0),
              GroundControlPoint(2, 2, 200.0, 2000.0, z=0.0),
          ], crs
  
          gcps, crs = dst.gcps
  
          assert crs.to_epsg() == 4326
          assert len(gcps) == 2
          point = gcps[1]
          assert (2, 2) == (point.row, point.col)
          assert (200.0, 2000.0, 0.0) == (point.x, point.y, point.z)
  
file_path: rasterio/tests/test_gcps.py
imports: import numpy
  import pytest
  import rasterio
  from rasterio.control import GroundControlPoint
label_desc: Use image node_id 7 for calling a global function with example usage: test_write_read_gcps(tmpdir) without return types