human
Complete the below
def _pytest_image_comparison(baseline_images, extensions, tol, freetype_version, remove_text, savefig_kwargs, style):

    ''''Decorate function with image comparison for pytest.
    This function creates a decorator that wraps a figure-generating function
    with image comparison code. Pytest can become confused if we change the
    signature of the function, so we indirectly pass anything we need via the
    `mpl_image_comparison_parameters` fixture and extra markers.'
    '''
 ... What is a the Python program you requested?
assistant
#Here is the Python program you requested.
    import pytest
    extensions = map(_mark_xfail_if_format_is_uncomparable, extensions)
    def decorator(func):
        @pytest.mark.usefixtures(u'mpl_image_comparison_parameters')
        @pytest.mark.parametrize(u'extension', extensions)
        @pytest.mark.baseline_images(baseline_images)
        @pytest.mark.style(style)
        @_checked_on_freetype_version(freetype_version)
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            __tracebackhide__ = True
            img = _ImageComparisonBase(tol=tol, remove_text=remove_text, savefig_kwargs=savefig_kwargs)
            img.delayed_init(func)
            matplotlib.testing.set_font_settings_for_testing()
            func(*args, **kwargs)
            (baseline_images, extension) = func.parameters
            assert (len(plt.get_fignums()) == len(baseline_images)), u'Test    generated    {}    images    but    there    are    {}    baseline    images'.format(len(plt.get_fignums()), len(baseline_images))
            for (idx, baseline) in enumerate(baseline_images):
                img.compare(idx, baseline, extension)
        wrapper.__wrapped__ = func
        return _copy_metadata(func, wrapper)
    return decorator