code: def test_register_operation():
      """
      The most simple way to extend the pipeline operations is by passing a
      function with proper arguments.
      :return:
      """
      test_pipe = Pipeline(
          STEPS,
          models=[
              ("ents", "nl", model_path_nl),
              ("other_identifier", "en", model_path_en),
          ],
      )
  
      def custom_op(doc, **kwargs):
          return kwargs
  
      test_pipe.register_operation("CUSTOM_STEP", custom_op)
      assert len(test_pipe._operations) == len(STEPS) + 1
  
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 7 for calling a global function with example usage: test_register_operation() and returns: kwargs