code: def get_output_signature(
      func: tf_ext.DecoratedFunction,
  ) -> (
      tf_ext.ConcreteFunction
      | t.Tuple[t.Any, ...]
      | dict[str, tf_ext.TypeSpec]
  ):
      if hasattr(func, "function_spec"):  # for RestoredFunction
          # assume all concrete functions have same signature
          concrete_function_wrapper: "tf_ext.ConcreteFunction" = (
              getattr(func, "concrete_functions")[0]
          )
          return get_output_signature(concrete_function_wrapper)
  
      if hasattr(
          func, "structured_input_signature"
      ):  # for ConcreteFunction
          if getattr(func, "structured_outputs") is not None:
              outputs = getattr(func, "structured_outputs")
              if LazyType[t.Dict[str, "tf_ext.TensorSpec"]](
                  dict
              ).isinstance(outputs):
                  return {
                      k: normalize_spec(v) for k, v in outputs.items()
                  }
              return outputs
          else:
              outputs: t.Tuple["tf_ext.TensorSpec"] = getattr(
                  func, "outputs"
              )
              return tuple(normalize_spec(v) for v in outputs)
  
      return tuple()
  
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 10 for calling a global function with example usage: get_output_signature(func) and returns: tuple, get_output_signature, outputs, tuple, unknown