code: def test_not_fitted_from_estimator(self, method):
      """
      Ensure not fitted can be raised directly from an estimator
      """
      msg = "instance is not fitted yet, please call fit"
      with pytest.raises(NotFitted, match=msg):
          raise NotFitted.from_estimator(self, method)
  
imports: import pytest
  from yellowbrick.exceptions import NotFitted
label_desc: Use image node_id 1 for calling the TestExceptions obj's underlying member method code with example usage: obj.test_not_fitted_from_estimator(method) without return types