code: def test_warp_reproject_dst_bounds(runner, tmpdir):
      """--bounds option works."""
      srcname = "tests/data/shade.tif"
      outputname = str(tmpdir.join("test.tif"))
      out_bounds = [-106.45036, 39.6138, -106.44136, 39.6278]
      result = runner.invoke(
          main_group,
          [
              "warp",
              srcname,
              outputname,
              "--dst-crs",
              "EPSG:4326",
              "--res",
              0.001,
              "--bounds",
          ]
          + out_bounds,
      )
      assert result.exit_code == 0
      assert os.path.exists(outputname)
  
      with rasterio.open(outputname) as output:
          assert output.crs == {"init": "epsg:4326"}
          assert np.allclose(output.bounds[0::3], [-106.45036, 39.6278])
          assert np.allclose(
              [0.001, 0.001], [output.transform.a, -output.transform.e]
          )
  
          # XXX: an extra row and column is produced in the dataset
          # because we're using ceil instead of floor internally.
          # Not necessarily a bug, but may change in the future.
          assert np.allclose(
              [output.bounds[2] - 0.001, output.bounds[1] + 0.001],
              [-106.44136, 39.6138],
          )
          assert output.width == 10
          assert output.height == 15
  
imports: import os
  import affine
  import numpy
  import pytest
  import rasterio
  from rasterio.warp import SUPPORTED_RESAMPLING
  from rasterio.rio import warp
  from rasterio.rio.main import main_group
label_desc: Use image node_id 26 for calling a global function with example usage: test_warp_reproject_dst_bounds(runner, tmpdir) without return types