code: def basic_image_tif_2(tmpdir, basic_image_2):
      """
      A GeoTIFF representation of the basic_image_2 array.
      Borrowed from rasterio/tests/conftest.py
  
      Returns
      -------
      string path to raster file
      """
      outfilename = str(tmpdir.join("basic_image_2.tif"))
      kwargs = {
          "crs": rio.crs.CRS({"init": "epsg:4326"}),
          "transform": Affine.identity(),
          "count": 1,
          "dtype": rio.uint8,
          "driver": "GTiff",
          "width": basic_image_2.shape[1],
          "height": basic_image_2.shape[0],
          "nodata": None,
      }
      with rio.open(outfilename, "w", **kwargs) as out:
          out.write(basic_image_2, indexes=1)
      return outfilename
  
imports: import os
  import numpy
  import pytest
  from affine import Affine
  import rasterio
  import geopandas
  from shapely.geometry import Polygon
label_desc: Use image node_id 4 for calling a global function with example usage: basic_image_tif_2(tmpdir, basic_image_2) and returns: outfilename