code: def test_pipeline():
      pipeline = Pipeline(max_loops_allowed=10)
      pipeline.add_component("add_1", AddFixedValue())
      pipeline.add_component("self_loop", SelfLoop())
      pipeline.add_component("add_2", AddFixedValue())
      pipeline.connect("add_1", "self_loop.values")
      pipeline.connect("self_loop.current_value", "self_loop.values")
      pipeline.connect("self_loop.final_result", "add_2.value")
  
      results = pipeline.run({"add_1": {"value": 5}})
      assert results["add_2"]["result"] == 1
  
imports: from haystack.core.component import component
  from haystack.core.pipeline import Pipeline
  from haystack.testing.sample_components import AddFixedValue, SelfLoop
  import logging
label_desc: Use image node_id 2 for calling a global function with example usage: test_pipeline() without return types