def use_markers(model, w_marker=None, c_marker='c'):
    """
    Temporarily modifies the _compute_* methods of the model to insert placeholder
    values instead of coefficients in the QUBO. Note that the original methods are still
    called, because they can have side-effects (example: computing new xplet properties).

    Usage:

        with use_markers(model) as altered_model:
            Q = altered_model.to_qubo()
    :param model: an implementation of :py:class:`hepqpr.qallse.QallseBase`
    :param w_marker: the placeholder used for linear weights. Set it to None to use the original weight.
    :param c_marker: the placeholder used for conflict strengths. Set it to None to use the original weight. Default to 'c'.
    :return: an altered model
    """
    old_cw, old_cc = None, None
    # change the model functions during qubo
    if w_marker is not None:
        old_cw = model._compute_weight

        def new_cv(*args, **kwargs):
            old_cw(*args, **kwargs)
            return w_marker

        model._compute_weight = new_cv

    if c_marker is not None:
        old_cc = model._compute_conflict_strength

        def new_cc(*args, **kwargs):
            old_cc(*args, **kwargs)
            return c_marker

        model._compute_conflict_strength = new_cc

    yield model

    if old_cw is not None: model._compute_weight = old_cw
    if old_cc is not None: model._compute_conflict_strength = old_cc