code: def assert_not_fitted(estimator, attrs=ATTRS, X_test=None):
      """
      Check that the estimator is not fitted by ensuring it does not have
      any of the attributes specified in attrs. If X_test is specified,
      it is passed to predict, which must also raise a NotFitted exception.
      """
      __traceback_hide__ = True
      for attr in attrs:
          msg = "model is fitted, has {} attribute".format(attr)
          assert not hasattr(estimator, attr), msg
  
      if X_test is not None:
          with pytest.raises((NotFitted, NotFittedError)):
              estimator.predict(X_test)
  
file_path: yellowbrick/tests/test_classifier/conftest.py
imports: import pytest
  from tests.fixtures import Dataset, Split
  from yellowbrick.exceptions import NotFitted
  from sklearn.exceptions import NotFittedError
  from sklearn.datasets import make_classification
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 1 for calling a global function with example usage: assert_not_fitted(estimator, attrs, X_test) without return types