code: def check_explain_linear_binary(res, clf, target="alt.atheism"):
      expl_text, expl_html = format_as_all(res, clf)
      assert len(res.targets) == 1
      e = res.targets[0]
      assert e.target == target
      pos = get_all_features(e.feature_weights.pos)
      assert "objective" in pos
      for expl in [expl_text, expl_html]:
          assert target in expl
          assert "objective" in expl
  
imports: from __future__ import absolute_import
  from pprint import pprint
  import attr
  import pytest
  from sklearn.base import BaseEstimator
  from sklearn.feature_extraction import DictVectorizer
  from sklearn.feature_extraction.text import CountVectorizer, HashingVectorizer
  from sklearn.linear_model import LinearRegression
  from sklearn.linear_model import LogisticRegression
  from sklearn.pipeline import FeatureUnion
  from eli5 import explain_prediction, explain_weights
  from eli5.formatters import format_as_html
  from eli5.sklearn import invert_hashing_and_fit, InvertableHashingVectorizer
  from .utils import format_as_all, get_all_features, get_names_coefs, write_html
label_desc: Use image node_id 1 for calling a global function with example usage: check_explain_linear_binary(res, clf, target) without return types