code: def describe_pipeline_inputs(graph: networkx.MultiDiGraph):
      """
      Returns a dictionary with the input names and types that this pipeline accepts.
      """
      inputs = {
          comp: {
              socket.name: {
                  "type": socket.type,
                  "is_mandatory": socket.is_mandatory,
              }
              for socket in data
          }
          for comp, data in find_pipeline_inputs(graph).items()
          if data
      }
      return inputs
  
file_path: haystack/haystack/core/pipeline/descriptions.py
imports: from typing import List, Dict
  import logging
  import networkx
  from haystack.core.type_utils import _type_name
  from haystack.core.component.sockets import InputSocket, OutputSocket
label_desc: Use image node_id 3 for calling a global function with example usage: describe_pipeline_inputs(graph) and returns: inputs