def METHOD_NAME(V, Ybus, S, I, pq, pvpq):
    """
    :param V:
    :param Ybus:
    :param S:
    :param I:
    :param pq:
    :param pv:
    :param pvpq:
    :return:
    """
    # compute the mismatch function f(x_new)
    dS = V * np.conj(Ybus * V - I) - S  # complex power mismatch
    return np.r_[dS[pvpq].real, dS[pq].imag]  # concatenate to form the mismatch function