code: def parse_typehint_component_function(
      func: types.FunctionType,
  ) -> ParsedSignature:
      """Parses the given component executor function.
  
      This method parses a typehinted-annotated Python function that is intended to
      be used as a component and returns the information needed about the interface
      (inputs / outputs / returned output values) about that components, as well as
      a list of argument names and formats for determining the parameters that
      should be passed when calling `func(*args)`.
  
      Args:
        func: A component executor function to be parsed.
  
      Returns:
        A ParsedSignature.
      """
      utils.assert_is_functype(func)
  
      # Inspect the component executor function.
      typehints = (
          func.__annotations__
      )  # pytype: disable=attribute-error
      argspec = inspect.getfullargspec(
          func
      )  # pytype: disable=module-attr
      subject_message = (
          "Component declared as a typehint-annotated function"
      )
      _validate_signature(func, argspec, typehints, subject_message)
  
      # Parse the function and return its details.
      return _parse_signature(func, argspec, typehints)
  
file_path: tfx/tfx/dsl/component/experimental/function_parser.py
imports: import inspect
  import sys
  import types
  import typing
  from typing import Any, Dict, NamedTuple, Optional, Type, Union, get_args, get_origin
  from tfx.dsl.component.experimental import annotations
  from tfx.dsl.component.experimental import json_compat
  from tfx.dsl.component.experimental import utils
  from tfx.types import artifact
  from tfx.types import standard_artifacts
  import typing_extensions
label_desc: Use image node_id 5 for calling a global function with example usage: parse_typehint_component_function(func) and returns: _parse_signature