def METHOD_NAME(img=None, cp=None, ai=None, label=None, sg=None, ax=None):
    """Display an image with the control points and the calibrated rings
    in Jupyter notebooks
    :param img: 2D numpy array with an image
    :param cp: ControlPoint instance
    :param ai: azimuthal integrator for iso-2th curves
    :param label: name of the curve
    :param sg: single geometry object regrouping img, cp and ai
    :param ax: subplot object to display in, if None, a new one is created.
    :return: Matplotlib subplot
    """
    if ax is None:
        _fig, ax = subplots()
    if sg is not None:
        if img is None:
            img = sg.image
        if cp is None:
            cp = sg.control_points
        if ai is None:
            ai = sg.geometry_refinement
        if label is None:
            label = sg.label
    try:
        colornorm = SymLogNorm(1, base=10,
                               vmin=numpy.nanmin(img),
                               vmax=numpy.nanmax(img))
    except: # elder version of matplotlib <3.2 do not support the base kwarg.
        colornorm = SymLogNorm(1,
                               vmin=numpy.nanmin(img),
                               vmax=numpy.nanmax(img))
    ax.imshow(img,
              origin="lower",
              cmap="inferno",
              norm=colornorm)
    ax.set_title(label)
    if cp is not None:
        for lbl in cp.get_labels():
            pt = numpy.array(cp.get(lbl=lbl).points)
            if len(pt) > 0:
                ax.scatter(pt[:, 1], pt[:, 0], label=lbl)
        if ai is not None and cp.calibrant is not None:
            tth = cp.calibrant.get_2th()
            ttha = ai.twoThetaArray()
            ax.contour(ttha, levels=tth, cmap="autumn", linewidths=2, linestyles="dashed")
        ax.legend()
    return ax