code: def test_given_unfitted_mechanisms_when_evaluate_unit_change_methods_then_raises_exception():
      with pytest.raises(NotFittedError):
          unit_change_linear(
              SklearnLinearRegressionModel(LinearRegression()),
              pd.DataFrame(
                  data=dict(
                      A=np.random.normal(size=100),
                      B=np.random.normal(size=100),
                  )
              ),
              SklearnLinearRegressionModel(LinearRegression()),
              pd.DataFrame(
                  data=dict(
                      A=np.random.normal(size=100),
                      B=np.random.normal(size=100),
                  )
              ),
              ["A", "B"],
          )
  
      with pytest.raises(NotFittedError):
          unit_change_nonlinear(
              SklearnRegressionModel(LinearRegression()),
              pd.DataFrame(
                  data=dict(
                      A=np.random.normal(size=100),
                      B=np.random.normal(size=100),
                  )
              ),
              SklearnRegressionModel(LinearRegression()),
              pd.DataFrame(
                  data=dict(
                      A=np.random.normal(size=100),
                      B=np.random.normal(size=100),
                  )
              ),
              ["A", "B"],
              shapley_config=ShapleyConfig(n_jobs=1),
          )
  
      with pytest.raises(NotFittedError):
          unit_change_nonlinear(
              SklearnRegressionModel(RFR(n_jobs=1)),
              pd.DataFrame(
                  data=dict(
                      A=np.random.normal(size=100),
                      B=np.random.normal(size=100),
                  )
              ),
              SklearnRegressionModel(RFR(n_jobs=1)),
              pd.DataFrame(
                  data=dict(
                      A=np.random.normal(size=100),
                      B=np.random.normal(size=100),
                  )
              ),
              ["A", "B"],
              shapley_config=ShapleyConfig(n_jobs=1),
          )
  
imports: import numpy
  import pandas
  import pytest
  from flaky import flaky
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.exceptions import NotFittedError
  from sklearn.linear_model import LinearRegression
  from dowhy.gcm.ml.regression import SklearnRegressionModel
  from dowhy.gcm.shapley import ShapleyConfig
  from dowhy.gcm.unit_change import SklearnLinearRegressionModel, unit_change, unit_change_linear, unit_change_linear_input_only, unit_change_nonlinear, unit_change_nonlinear_input_only
label_desc: Use image node_id 3 for calling a global function with example usage: test_given_unfitted_mechanisms_when_evaluate_unit_change_methods_then_raises_exception() without return types