code: def test_image_merge():
      # tests the basic image merging functionality
      tiles = []
      for i in range(1, 4):
          for j in range(0, 3):
              tiles.append((i, j, 2))
  
      gt = cimgt.GoogleTiles()
      gt._image_url = types.MethodType(
          ctest_tiles.GOOGLE_IMAGE_URL_REPLACEMENT, gt
      )
      images_to_merge = []
      for tile in tiles:
          img, extent, origin = gt.get_image(tile)
          img = np.array(img)
          x = np.linspace(
              extent[0], extent[1], img.shape[1], endpoint=False
          )
          y = np.linspace(
              extent[2], extent[3], img.shape[0], endpoint=False
          )
          images_to_merge.append([img, x, y, origin])
  
      img, extent, origin = cimgt._merge_tiles(images_to_merge)
      ax = plt.axes(projection=gt.crs)
      ax.set_global()
      ax.coastlines()
      ax.imshow(img, origin=origin, extent=extent, alpha=0.5)
  
      return ax.figure
  
imports: import types
  import matplotlib.colors
  import matplotlib.pyplot
  import numpy
  from PIL import Image
  import pytest
  import shapely.geometry
  from cartopy import config
  import cartopy.crs
  import cartopy.io.img_tiles
  from cartopy.tests.conftest import _HAS_PYKDTREE_OR_SCIPY
  import cartopy.tests.test_img_tiles
label_desc: Use image node_id 2 for calling a global function with example usage: test_image_merge() and returns: ax