code: def test_pipeline_resolution_simple_input():
      @component
      class Hello:
          @component.output_types(output=str)
          def run(self, word: str):
              """
              Takes a string in input and returns "Hello, <string>!"
              in output.
              """
              return {"output": f"Hello, {word}!"}
  
      pipeline = Pipeline()
      pipeline.add_component("hello", Hello())
      pipeline.add_component("hello2", Hello())
  
      pipeline.connect("hello.output", "hello2.word")
      result = pipeline.run(data={"hello": {"word": "world"}})
      assert result == {"hello2": {"output": "Hello, Hello, world!!"}}
  
      result = pipeline.run(data={"word": "world"})
      assert result == {"hello2": {"output": "Hello, Hello, world!!"}}
  
file_path: haystack/test/test_pipeline.py
imports: from typing import Optional
  import pytest
  from haystack import Pipeline, component
label_desc: Use image node_id 6 for calling a global function with example usage: test_pipeline_resolution_simple_input() and returns: dict