def validate_opt_schema(value, _):
    """
    Validate the `optimization_schema` port
    """
    if value:
        if value["global_energy_shift"].value and not value["global_split_norm"].value:
            return "Not supported global_energy_shift=True AND global_split_norm=False. Change `optimization_schema`."
        if value["global_energy_shift"].value and value["charge_confinement"].value:
            return "charge_confinement incompatible with global_energy_shift=True. Change `optimization_schema`."