code: def test_json_classification():
      data = synthetic_classification()
      X = data["full"]["X"]
      y = data["full"]["y"]
  
      X["A"] = pd.cut(
          X["A"],
          [-np.inf, -1, -0.5, 0.5, 1, np.inf],
          labels=["apples", "oranges", "0", "almonds", "peanuts"],
          ordered=False,
      )
      X["B"] = pd.cut(
          X["B"],
          [-np.inf, -0.5, 0.5, np.inf],
          labels=["low", "medium", "high"],
          ordered=True,
      )
      X["C"] = X["C"].mask(X["C"] < 0, 0)
  
      clf = ExplainableBoostingClassifier(
          outer_bags=3,
          max_bins=10,
          max_interaction_bins=4,
          interactions=[(1, 2), (2, 0)],
      )
      clf.fit(X, y)
  
      # combine the last two bins into one bin
      max_val = max(clf.bins_[0][0].values())
      clf.bins_[0][0] = {
          key: value if value != max_val else max_val - 1
          for key, value in clf.bins_[0][0].items()
      }
  
      clf.term_scores_[0] = np.delete(clf.term_scores_[0], 1)
      clf.term_scores_[0][1] = -np.inf
      clf.term_scores_[0][2] = np.inf
      clf.term_scores_[0][3] = np.nan
  
      clf.standard_deviations_[0] = np.delete(
          clf.standard_deviations_[0], 1
      )
      clf.bagged_scores_[0] = np.array(
          [
              np.delete(clf.bagged_scores_[0][0], 1),
              np.delete(clf.bagged_scores_[0][1], 1),
              np.delete(clf.bagged_scores_[0][2], 1),
          ]
      )
  
      clf.bin_weights_[0] = np.delete(clf.bin_weights_[0], 1)
  
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore", "JSON formats are in beta.*"
          )
  
          clf.to_jsonable(detail="all")
  
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 39 for calling a global function with example usage: test_json_classification() without return types