def METHOD_NAME(ref_list, order=1, export=False, saveplot=False):
    """Run convergence test for the given mesh refiments"""
    err = []
    for r in ref_list:
        err.append(compute(r, order=order, do_export=export))
    x_log = numpy.log10(numpy.array(ref_list, dtype=float)**-1)
    y_log = numpy.log10(numpy.array(err))
    y_log_div = y_log[:, 1]
    y_log_uv = y_log[:, 0]
    def check_convergence(x_log, y_log, expected_slope, test_name, field_str, saveplot):
        slope_rtol = 0.1
        slope, intercept, r_value, p_value, std_err = stats.linregress(x_log, y_log)
        if saveplot:
            import matplotlib.pyplot as plt
            fig, ax = plt.subplots(figsize=(5, 5))
            # plot points
            ax.plot(x_log, y_log, 'k.')
            x_min = x_log.min()
            x_max = x_log.max()
            offset = 0.05*(x_max - x_min)
            npoints = 50
            xx = numpy.linspace(x_min - offset, x_max + offset, npoints)
            yy = intercept + slope*xx
            # plot line
            ax.plot(xx, yy, linestyle='--', linewidth=0.5, color='k')
            ax.text(xx[2*int(npoints/3)], yy[2*int(npoints/3)], '{:4.2f}'.format(slope),
                    verticalalignment='top',
                    horizontalalignment='left')
            ax.set_xlabel('log10(dx)')
            ax.set_ylabel('log10(L2 error)')
            ax.set_title(field_str)
            ref_str = 'ref-' + '-'.join([str(r) for r in ref_list])
            order_str = 'o{:}'.format(order)
            imgfile = '_'.join(['convergence', test_name, field_str, ref_str, order_str])
            imgfile += '.png'
            imgdir = '.'
            imgfile = os.path.join(imgdir, imgfile)
            print('saving figure {:}'.format(imgfile))
            plt.savefig(imgfile, dpi=200, bbox_inches='tight')
        if expected_slope is not None:
            err_msg = '{:}: Wrong convergence rate {:.4f}, expected {:.4f}'.format(test_name, slope, expected_slope)
            assert abs(slope - expected_slope)/expected_slope < slope_rtol, err_msg
            print('{:}: {:} convergence rate {:.4f} PASSED'.format(test_name, field_str, slope))
        else:
            print('{:}: {:} convergence rate {:.4f}'.format(test_name, field_str, slope))
        return slope
    check_convergence(x_log, y_log_div, order, 'divergence_2d', 'div', saveplot)
    check_convergence(x_log, y_log_uv, order + 1, 'divergence_2d', 'uv', saveplot)