code: def test_show_fields(newsgroups_train):
      docs, y, target_names = newsgroups_train
      vec = TfidfVectorizer()
      clf = LogisticRegression(C=0.1)
  
      X = vec.fit_transform(docs)
      clf.fit(X, y)
  
      expl = explain_weights_sklearn(clf, vec)
      text, html = format_as_all(expl, clf)
  
      assert "Caveats" in text
      assert "Caveats" in html
      assert "<BIAS>" in text
      assert "BIAS" in html
  
      text, html = format_as_all(expl, clf, show=fields.WEIGHTS)
  
      assert "Caveats" not in text
      assert "Caveats" not in html
      assert "<BIAS>" in text
      assert "BIAS" in html
  
      text, html = format_as_all(expl, clf, show=fields.INFO)
      assert "Caveats" in text
      assert "Caveats" in html
      assert "<BIAS>" not in text
      assert "BIAS" not in html
  
file_path: eli5/tests/test_formatters.py
imports: from __future__ import absolute_import
  import re
  import pytest
  import numpy
  from sklearn.feature_extraction.text import TfidfVectorizer
  from sklearn.linear_model import LogisticRegression, LinearRegression
  from eli5.sklearn import explain_weights_sklearn, explain_prediction_sklearn
  from eli5.formatters import fields
  from eli5.formatters.text import _SPACE
  from .utils import format_as_all, get_all_features
label_desc: Use image node_id 1 for calling a global function with example usage: test_show_fields(newsgroups_train) without return types