def _check_partial_fit_first_call(clf, classes=None):
    if getattr(clf, 'classes_', None) is None and classes is None:
        raise ValueError("classes must be passed on the first call "
                         "to partial_fit.")

    elif classes is not None:
        if getattr(clf, 'classes_', None) is not None:
            if not array_equal(clf.classes_, unique_labels(classes)):
                raise ValueError(
                    "`classes=%r` is not the same as on last call "
                    "to partial_fit, was: %r" % (classes, clf.classes_))

        else:
            # This is the first call to partial_fit
            clf.classes_ = unique_labels(classes)
            return True

    # classes is None and clf.classes_ has already previously been set:
    # nothing to do
    return False
Returns the Boolean represented by bool_str.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/utils/multiclass.py/_check_partial_fit_first_call--crossover with--dataset/ETHPy150Open openstack/python-ironicclient/ironicclient/common/utils.py/bool_argument_value