code: def run_roc_auc_multi(self, tree_method, n_samples, weighted):
      import numpy as np
      from sklearn.datasets import make_classification
      from sklearn.metrics import roc_auc_score
  
      rng = np.random.RandomState(1994)
      n_samples = n_samples
      n_features = 10
      n_classes = 4
  
      X, y = make_classification(
          n_samples,
          n_features,
          n_informative=n_features,
          n_redundant=0,
          n_classes=n_classes,
          random_state=rng,
      )
      if weighted:
          weights = rng.randn(n_samples)
          weights -= weights.min()
          weights /= weights.max()
      else:
          weights = None
  
      Xy = xgb.DMatrix(X, y, weight=weights)
      booster = xgb.train(
          {
              "tree_method": tree_method,
              "eval_metric": "auc",
              "objective": "multi:softprob",
              "num_class": n_classes,
          },
          Xy,
          num_boost_round=1,
      )
      score = booster.predict(Xy)
      skl_auc = roc_auc_score(
          y,
          score,
          average="weighted",
          sample_weight=weights,
          multi_class="ovr",
      )
      auc = float(booster.eval(Xy).split(":")[1])
      np.testing.assert_allclose(skl_auc, auc, rtol=1e-6)
  
      X = rng.randn(*X.shape)
  
      score = booster.predict(xgb.DMatrix(X, weight=weights))
      skl_auc = roc_auc_score(
          y,
          score,
          average="weighted",
          sample_weight=weights,
          multi_class="ovr",
      )
      auc = float(
          booster.eval(xgb.DMatrix(X, y, weight=weights)).split(":")[1]
      )
      np.testing.assert_allclose(skl_auc, auc, rtol=1e-5)
  
imports: import numpy
  import pytest
  import xgboost
  from xgboost import testing
  from xgboost.testing.metrics import check_precision_score, check_quantile_error
label_desc: Use image node_id 10 for calling the TestEvalMetrics obj's underlying member method code with example usage: obj.run_roc_auc_multi(tree_method, n_samples, weighted) without return types