docstr: Organizes input data for pipeline components and identifies any inputs that are not matched to any
  component's input slots.
  
  This method processes a flat dictionary of input data, where each key-value pair represents an input name
  and its corresponding value. It distributes these inputs to the appropriate pipeline components based on
  their input requirements. Inputs that don't match any component's input slots are classified as unresolved.
  
  :param data: A dictionary with input names as keys and input values as values.
  :type data: Dict[str, Any]
  :return: A tuple containing two elements:
       1. A dictionary mapping component names to their respective matched inputs.
       2. A dictionary of inputs that were not matched to any component, termed as unresolved keyword arguments.
  :rtype: Tuple[Dict[str, Dict[str, Any]], Dict[str, Any]]
docstr_tok: ["Organizes","input","data","for","pipeline","components","and","identifies","any","inputs","that","are","not","matched","to","any","component","'s","input","slots",".","This","method","processes","a","flat","dictionary","of","input","data",",","where","each","key-value","pair","represents","an","input","name","and","its","corresponding","value",".","It","distributes","these","inputs","to","the","appropriate","pipeline","components","based","on","their","input","requirements",".","Inputs","that","do","n't","match","any","component","'s","input","slots","are","classified","as","unresolved",".",":","param","data",":","A","dictionary","with","input","names","as","keys","and","input","values","as","values",".",":","type","data",":","Dict","[","str",",","Any","]",":","return",":","A","tuple","containing","two","elements",":","1",".","A","dictionary","mapping","component","names","to","their","respective","matched","inputs",".","2",".","A","dictionary","of","inputs","that","were","not","matched","to","any","component",",","termed","as","unresolved","keyword","arguments",".",":","rtype",":","Tuple","[","Dict","[","str",",","Dict","[","str",",","Any","]","]",",","Dict","[","str",",","Any","]","]"]
code: def _prepare_component_input_data(
      self, data: Dict[str, Any]
  ) -> Tuple[Dict[str, Dict[str, Any]], Dict[str, Any]]:
      """
      Organizes input data for pipeline components and identifies any inputs that are not matched to any
      component's input slots.
  
      This method processes a flat dictionary of input data, where each key-value pair represents an input name
      and its corresponding value. It distributes these inputs to the appropriate pipeline components based on
      their input requirements. Inputs that don't match any component's input slots are classified as unresolved.
  
      :param data: A dictionary with input names as keys and input values as values.
      :type data: Dict[str, Any]
      :return: A tuple containing two elements:
           1. A dictionary mapping component names to their respective matched inputs.
           2. A dictionary of inputs that were not matched to any component, termed as unresolved keyword arguments.
      :rtype: Tuple[Dict[str, Dict[str, Any]], Dict[str, Any]]
      """
      pipeline_input_data: Dict[str, Dict[str, Any]] = defaultdict(dict)
      unresolved_kwargs = {}
  
      # Retrieve the input slots for each component in the pipeline
      available_inputs: Dict[str, Dict[str, Any]] = self.inputs()
  
      # Go through all provided to distribute them to the appropriate component inputs
      for input_name, input_value in data.items():
          resolved_at_least_once = False
  
          # Check each component to see if it has a slot for the current kwarg
          for (
              component_name,
              component_inputs,
          ) in available_inputs.items():
              if input_name in component_inputs:
                  # If a match is found, add the kwarg to the component's input data
                  pipeline_input_data[component_name][
                      input_name
                  ] = input_value
                  resolved_at_least_once = True
  
          if not resolved_at_least_once:
              unresolved_kwargs[input_name] = input_value
  
      return pipeline_input_data, unresolved_kwargs
  
file_path: haystack/haystack/pipeline.py
imports: from collections import defaultdict
  from typing import Any, Dict, Optional, Union, TextIO, Tuple
  from pathlib import Path
  import datetime
  import logging
  from haystack.core.pipeline import Pipeline
  from haystack.telemetry import pipeline_running
  from haystack.marshal import Marshaller, YamlMarshaller
label_desc: Use image node_id 8 for calling the Pipeline obj's underlying member method code with example usage: obj._prepare_component_input_data(data) and returns: pipeline_input_data,  unresolved_kwargs