code: def test_show_weights():
      clf = LogisticRegression()
      X = [[0, 0], [1, 1], [0, 1]]
      y = ["a", "b", "a"]
      clf.fit(X, y)
  
      html = eli5.show_weights(clf)
      # write_html(clf, html.data, '')
      assert isinstance(html, HTML)
      assert "y=b" in html.data
      assert "Explained as" not in html.data
  
      # explain_weights arguments are supported
      html = eli5.show_weights(clf, target_names=["A", "B"])
      assert "y=B" in html.data
  
      # format_as_html arguments are supported
      html = eli5.show_weights(clf, show=["method"])
      assert "y=b" not in html.data
      assert "Explained as" in html.data
  
file_path: eli5/tests/test_ipython.py
imports: import pytest
  import numpy
  from sklearn.linear_model import LogisticRegression
  from IPython.display import HTML
  import eli5
  from .utils import write_html
label_desc: Use image node_id 1 for calling a global function with example usage: test_show_weights() without return types