code: def test_explain_prediction_clf_multitarget(newsgroups_train):
      docs, ys, target_names = newsgroups_train
      from sklearn.feature_extraction.text import ENGLISH_STOP_WORDS
  
      stop_words = set(ENGLISH_STOP_WORDS) | {"does", "just"}
      vec = CountVectorizer(stop_words=stop_words, dtype=np.float64)
      xs = vec.fit_transform(docs)
      clf = LGBMClassifier(
          n_estimators=100,
          max_depth=2,
          min_child_samples=1,
          min_child_weight=1,
          random_state=42,
      )
      clf.fit(xs, ys)
      doc = "computer graphics in space: a new religion"
      res = explain_prediction(
          clf, doc, vec=vec, target_names=target_names
      )
      format_as_all(res, clf)
      check_targets_scores(res)
      graphics_weights = res.targets[1].feature_weights
      assert "computer" in get_all_features(graphics_weights.pos)
      religion_weights = res.targets[3].feature_weights
      assert "religion" in get_all_features(religion_weights.pos)
  
      top_target_res = explain_prediction(
          clf, doc, vec=vec, top_targets=2
      )
      assert len(top_target_res.targets) == 2
      assert (
          sorted(t.proba for t in top_target_res.targets)
          == sorted(t.proba for t in res.targets)[-2:]
      )
  
imports: from __future__ import absolute_import
  import pytest
  import numpy
  from sklearn.feature_extraction.text import CountVectorizer
  from lightgbm import LGBMClassifier, LGBMRegressor
  from eli5 import explain_weights, explain_prediction
  from .test_sklearn_explain_weights import test_explain_tree_classifier, test_explain_random_forest_and_tree_feature_filter, test_feature_importances_no_remaining, test_explain_tree_regressor
  from .test_sklearn_explain_prediction import assert_linear_regression_explained, test_explain_prediction_pandas, test_explain_clf_binary_iris
  from .utils import format_as_all, check_targets_scores, get_all_features
label_desc: Use image node_id 8 for calling a global function with example usage: test_explain_prediction_clf_multitarget(newsgroups_train) without return types