code: def test_error_if_ordinal_encoding_and_no_y_passed(df_enc):
      # test case 3: raises error if target is  not passed
      with pytest.raises(ValueError):
          encoder = OrdinalEncoder(encoding_method="ordered")
          encoder.fit(df_enc)
  
file_path: feature_engine/tests/test_encoding/test_ordinal_encoder.py
imports: import numpy
  import pandas
  import pytest
  from feature_engine.encoding import OrdinalEncoder
label_desc: Use image node_id 4 for calling a global function with example usage: test_error_if_ordinal_encoding_and_no_y_passed(df_enc) without return types