def _finalize_show(source_data, im, ax, alpha, url):
    """Common finalization code for show_raster and show_h3

    This sets the data source for the image, then sets up 
    clipping, sets a url for the image, sets up the image
    extent correctly, and adds the image to the Axes object.

    Parameters
    ----------
    source_data : varies
    im : InterpImage
    ax : matplotlib.Axes
    alpha : float
    url : str

    Returns
    -------
    InterpImage
    """
    im.set_data(source_data)
    im.set_alpha(alpha)
    if im.get_clip_path() is None:
        # image does not already have clipping set, clip to axes patch
        im.set_clip_path(ax.patch)
    im.set_url(url)
    # update ax.dataLim, and, if autoscaling, set viewLim
    # to tightly fit the image, regardless of dataLim.
    im.set_extent(im.get_extent())
    ax.add_image(im)
    return im