code: def describe_pipeline_inputs_as_string(graph: networkx.MultiDiGraph):
      """
      Returns a string representation of the input names and types that this pipeline accepts.
      """
      inputs = describe_pipeline_inputs(graph)
      message = "This pipeline expects the following inputs:\n"
      for comp, sockets in inputs.items():
          if sockets:
              message += f"- {comp}:\n"
              for name, socket in sockets.items():
                  message += (
                      f"    - {name}: {_type_name(socket['type'])}\n"
                  )
      return message
  
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 4 for calling a global function with example usage: describe_pipeline_inputs_as_string(graph) and returns: message