code: def test_pipeline_resolution_wrong_input_name(caplog):
      @component
      class Hello:
          @component.output_types(output=str)
          def run(self, who: str):
              """
              Takes a string in input and returns "Hello, <string>!"
              in output.
              """
              return {"output": f"Hello, {who}!"}
  
      pipeline = Pipeline()
      pipeline.add_component("hello", Hello())
      pipeline.add_component("hello2", Hello())
  
      pipeline.connect("hello.output", "hello2.who")
  
      # test case with nested component inputs
      with pytest.raises(ValueError):
          pipeline.run(data={"hello": {"non_existing_input": "world"}})
  
      # test case with flat component inputs
      with pytest.raises(ValueError):
          pipeline.run(data={"non_existing_input": "world"})
  
      # important to check that the warning is logged for UX purposes, leave it here
      assert "were not matched to any component" in caplog.text
  
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 7 for calling a global function with example usage: test_pipeline_resolution_wrong_input_name(caplog) and returns: dict