def METHOD_NAME(
    formatting,
    cats,
    quantity,
    total_quantity,
    allocation,
    total_allocation,
    kappa,
    kappasim=None,
):
    if formatting == "plain":
        if total_quantity is None:
            print(_("No data found in current region"))
            return
        for i, c in enumerate(cats):
            print(
                _("Quantity disagreement for class {c}: {q:.2f} %").format(
                    c=c, q=quantity[i] * 100
                )
            )
        print(
            _("Total quantity disagreement: {q:.2f} %").format(q=total_quantity * 100)
        )
        for i, c in enumerate(cats):
            print(
                _("Allocation disagreement for class {c}: {q:.2f} %").format(
                    c=c, q=allocation[i] * 100
                )
            )
        print(
            _("Total allocation disagreement: {q:.2f} %").format(
                q=total_allocation * 100
            )
        )
        if kappa is not None:
            print(_("Kappa: {kappa:.4f}").format(kappa=kappa))
        if kappasim is not None:
            print(_("Kappa simulation: {kappasim:.4f}").format(kappasim=kappasim))
    elif formatting == "shell":
        def format_value(val):
            return f"{val:.4f}" if val is not None else ""
        for i, c in enumerate(cats):
            print(f"quantity_class_{c}={quantity[i]:.4f}")
        print(f"total_quantity={format_value(total_quantity)}")
        for i, c in enumerate(cats):
            print(f"allocation_class_{c}={allocation[i]:.4f}")
        print(f"total_allocation={format_value(total_allocation)}")
        print(f"kappa={format_value(kappa)}")
        if kappasim is not None:
            print(f"kappasimulation={kappasim:.4f}")
    elif formatting == "json":
        # export everything even when None
        # for automated processing
        out = {}
        for i, c in enumerate(cats):
            out[f"quantity_class_{c}"] = quantity[i]
        for i, c in enumerate(cats):
            out[f"allocation_class_{c}"] = allocation[i]
        out["total_quantity"] = total_quantity
        out["total_allocation"] = total_allocation
        out["kappa"] = kappa
        out["kappasimulation"] = kappasim
        print(
            json.dumps(
                json.loads(json.dumps(out), parse_float=lambda x: round(float(x), 4))
            )
        )