code: def test_vlogit_2class():
      data = synthetic_classification()
      X_train = data["train"]["X"]
      y_train = data["train"]["y"]
      X_test = data["test"]["X"]
      y_test = data["test"]["y"]
  
      clf = ExplainableBoostingClassifier(interactions=10)
      clf.fit(X_train, y_train)
  
      # slightly unbalance the EBM so that it is not centered anymore through editing
      clf.term_scores_[0][1] = 10
  
      original_pred = clf.predict_proba(X_test)
  
      # hack the EBM into being a 2-class OVR, which is not legal, but will work
      mod = clf.copy()
      mod.standard_deviations_ = None
      mod.bagged_scores_ = None
      mod.bagged_intercept_ = None
      for i in range(len(mod.term_scores_)):
          term = np.expand_dims(mod.term_scores_[i], axis=-1)
          mod.term_scores_[i] = np.c_[-term, term]
      mod.intercept_ = np.array(
          [-mod.intercept_[0], mod.intercept_[0]], np.float64
      )
      mod.link_ = "vlogit"
  
      assert np.allclose(original_pred, mod.predict_proba(X_test))
      assert np.allclose(
          original_pred, mod._binarize(0.75)[1].predict_proba(X_test)
      )
      mod._multinomialize(0.625)
      assert np.allclose(original_pred, mod.predict_proba(X_test))
      assert np.allclose(
          original_pred, mod._binarize(0.5)[1].predict_proba(X_test)
      )
      mod._ovrize(0.125)
      assert np.allclose(original_pred, mod.predict_proba(X_test))
      assert np.allclose(
          original_pred, mod._binarize(0.25)[1].predict_proba(X_test)
      )
  
imports: import math
  from sklearn.metrics import log_loss
  from interpret.utils import make_synthetic
  from ...tutils import synthetic_multiclass, synthetic_classification, iris_classification, smoke_test_explanations
  from ...tutils import synthetic_regression
  from interpret.glassbox import ExplainableBoostingRegressor, ExplainableBoostingClassifier
  from interpret.privacy import DPExplainableBoostingClassifier, DPExplainableBoostingRegressor
  from interpret.utils import inv_link
  from io import StringIO
  import json
  import numpy
  import pandas
  from sklearn.model_selection import train_test_split
  from sklearn.metrics import accuracy_score
  from sklearn.utils.estimator_checks import check_estimator
  import pytest
  import warnings
label_desc: Use image node_id 4 for calling a global function with example usage: test_vlogit_2class() without return types