code: def pretty_format_function(
      function: tf_ext.DecoratedFunction,
      obj: str = "<object>",
      name: str = "<function>",
  ) -> str:
      ret = ""
      outs = get_output_signature(function)
      sigs = get_input_signatures(function)
      arg_names = get_arg_names(function)
  
      if hasattr(function, "function_spec"):
          arg_names = getattr(function, "function_spec").arg_names
      else:
          arg_names = getattr(function, "_arg_keywords")
  
      ret += _pretty_format_function_call(obj, name, arg_names)
      ret += "\n------------\n"
  
      signature_descriptions: list[str] = []
  
      for index, sig in enumerate(sigs):
          positional, keyword = sig
          signature_descriptions.append(
              f"Arguments Option {index + 1}:\n  {_pretty_format_positional(positional)}\n  Keyword arguments:\n    {keyword}"
          )
  
      ret += "\n\n".join(signature_descriptions)
      ret += f"\n\nReturn:\n  {outs}\n\n"
      return ret
  
imports: from __future__ import annotations
  import importlib.metadata
  import importlib.util
  import logging
  import typing
  from typing import TYPE_CHECKING
  from bentoml.exceptions import BentoMLException
  from ...types import LazyType
  from ...utils.lazy_loader import LazyLoader
label_desc: Use image node_id 16 for calling a global function with example usage: pretty_format_function(function, obj, name) and returns: ret