docstr: if transform called before fit: raise error
docstr_tok: ["if","transform","called","before","fit",":","raise","error"]
code: def test_not_fitted_transform(self):
      """if transform called before fit: raise error"""
      with pytest.raises(
          NotFittedError,
          match=r"This DynamicDataTransformer is not fitted yet\."
          " Call `fit` before using this method",
      ):
          df = pd.DataFrame(np.random.random([5, 5]))
          DynamicDataTransformer(p=1).transform(df)
  
file_path: causalnex/tests/structure/test_transformers.py
imports: import re
  import numpy
  import pandas
  import pytest
  from sklearn.exceptions import NotFittedError
  from causalnex.structure.transformers import DynamicDataTransformer
label_desc: Use image node_id 4 for calling the TestDynamicDataTransformer obj's underlying member method code with example usage: obj.test_not_fitted_transform() without return types