code: def _score_triple(X, cont1, cont2, cat, random_state):
      # score how well you can predict a category from two continuous features
      # assume this tree is simple enough so not be able to overfit in 2d
      # so we don't bother with train/test split
      if hasattr(X, "loc"):
          # we passed column names in a pandas dataframe
          X = X.dropna(subset=[cont1, cont2, cat])
          this_X = X.loc[:, [cont1, cont2]]
          target = X.loc[:, cat].cat.codes
      else:
          # we passed indices into a numpy array,
          # cat is an integer array
          this_X = X[:, [cont1, cont2]]
          target = cat
      n_splits = 3
      target = _prune_categories(
          target, replace=False, min_samples=n_splits
      )
      if target.isna().any():
          mask = target.isna()
          target = target[~mask]
          this_X = this_X[~mask]
      # limit to 2000 training points for speed?
      train_size = min(2000, int(0.9 * this_X.shape[0]))
      if train_size == 0:
          return 0
      cv = StratifiedShuffleSplit(
          n_splits=n_splits,
          train_size=train_size,
          random_state=random_state,
      )
      tree = DecisionTreeClassifier(max_leaf_nodes=8)
      return np.mean(
          cross_val_score(
              tree, this_X, target, cv=cv, scoring="recall_macro"
          )
      )
  
imports: from warnings import warn
  from functools import reduce
  import itertools
  import numpy
  import pandas
  import matplotlib.pyplot
  from matplotlib.axes import Axes
  from matplotlib.patches import Rectangle, Patch
  from matplotlib.ticker import EngFormatter
  from seaborn.utils import despine
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.metrics import roc_curve
  from sklearn.model_selection import cross_val_score, StratifiedShuffleSplit
  from ..preprocessing import detect_types
  from .._config import get_config
label_desc: Use image node_id 14 for calling a global function with example usage: _score_triple(X, cont1, cont2, cat, random_state) and returns: np, int