code: def test_write_cog(tmpdir, path_rgb_byte_tif):
      """Show resolution of issue #2102"""
      with rasterio.open(path_rgb_byte_tif) as src:
          profile = src.profile
          profile.update(
              driver="COG",
              extent=src.bounds,
              resampling=Resampling.bilinear,
          )
          with rasterio.open(
              str(tmpdir.join("test.tif")), "w", **profile
          ) as cog:
              cog.write(src.read())
  
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 29 for calling a global function with example usage: test_write_cog(tmpdir, path_rgb_byte_tif) without return types