code: def test_register_not_existing_step_should_throw_exception():
      """
      Checking the condition where we have not yet register the custom
      step, but we try to initialize with the Pipeline entry which we expect to fail
      since the init method will try to load the operation dynamically from the textpipe.operations
      :return:
      """
      custom_steps = STEPS.copy()
  
      custom_steps.append(("CUSTOM_STEP2", lambda x: None))
  
      with pytest.raises(AttributeError) as ae:
          test_pipe = Pipeline(custom_steps, **PIPELINE_DEF_KWARGS)
          print(ae.value)
          # somehow placing the following assert statement in the with statement
          # fails to assert, thus moved out of the context of the with
      assert "has no attribute 'CUSTOM_STEP2'" in str(ae.value)
  
file_path: textpipe/tests/test_pipeline.py
imports: import tempfile
  import pytest
  import spacy
  from textpipe.pipeline import Pipeline
label_desc: Use image node_id 10 for calling a global function with example usage: test_register_not_existing_step_should_throw_exception() without return types