code: def test_pipeline_equally_long_branches():
      pipeline = Pipeline(max_loops_allowed=10)
      pipeline.add_component(
          "merge",
          MergeLoop(expected_type=int, inputs=["in", "in_1", "in_2"]),
      )
      pipeline.add_component("remainder", Remainder(divisor=3))
      pipeline.add_component("add_one", AddFixedValue(add=1))
      pipeline.add_component("add_two", AddFixedValue(add=2))
  
      pipeline.connect("merge.value", "remainder.value")
      pipeline.connect("remainder.remainder_is_1", "add_two.value")
      pipeline.connect("remainder.remainder_is_2", "add_one.value")
      pipeline.connect("add_two", "merge.in_2")
      pipeline.connect("add_one", "merge.in_1")
  
      results = pipeline.run({"merge": {"in": 0}})
      assert results == {"remainder": {"remainder_is_0": 0}}
  
      results = pipeline.run({"merge": {"in": 3}})
      assert results == {"remainder": {"remainder_is_0": 3}}
  
      results = pipeline.run({"merge": {"in": 4}})
      assert results == {"remainder": {"remainder_is_0": 6}}
  
      results = pipeline.run({"merge": {"in": 5}})
      assert results == {"remainder": {"remainder_is_0": 6}}
  
      results = pipeline.run({"merge": {"in": 6}})
      assert results == {"remainder": {"remainder_is_0": 6}}
  
imports: from haystack.core.pipeline import Pipeline
  from haystack.testing.sample_components import AddFixedValue, MergeLoop, Remainder, FirstIntSelector
  import logging
label_desc: Use image node_id 1 for calling a global function with example usage: test_pipeline_equally_long_branches() without return types