code: def test_pipeline_resolution_with_mixed_correct_and_incorrect_input_names(
      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
      # this will raise ValueError because hello component does not have an input named "non_existing_input"
      # even though it has an input named "who"
      with pytest.raises(ValueError):
          pipeline.run(
              data={
                  "hello": {
                      "non_existing_input": "world",
                      "who": "world",
                  }
              }
          )
  
      # test case with flat component inputs
      # this will not raise ValueError because the input "who" will be resolved to the correct component
      # and we'll log a warning for the input "non_existing_input" which was not resolved
      result = pipeline.run(
          data={"non_existing_input": "world", "who": "world"}
      )
      assert result == {"hello2": {"output": "Hello, Hello, 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 8 for calling a global function with example usage: test_pipeline_resolution_with_mixed_correct_and_incorrect_input_names(caplog) and returns: dict