code: def _get_type_name(obj: object) -> str:
      """Get a simplified name for the type of the given object."""
      with contextlib.suppress(Exception):
          obj_type = obj if inspect.isclass(obj) else type(obj)
          type_name = "unknown"
          if hasattr(obj_type, "__qualname__"):
              type_name = obj_type.__qualname__
          elif hasattr(obj_type, "__name__"):
              type_name = obj_type.__name__
  
          if obj_type.__module__ != "builtins":
              # Add the full module path
              type_name = f"{obj_type.__module__}.{type_name}"
  
          if type_name in _OBJECT_NAME_MAPPING:
              type_name = _OBJECT_NAME_MAPPING[type_name]
          return type_name
      return "failed"
  
imports: import contextlib
  import inspect
  import os
  import sys
  import threading
  import time
  import uuid
  from collections.abc import Sized
  from functools import wraps
  from timeit import default_timer
  from typing import Any, Callable, List, Optional, Set, TypeVar, Union, cast, overload
  from typing_extensions import Final
  from streamlit import config, util
  from streamlit.logger import get_logger
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
  from streamlit.proto.PageProfile_pb2 import Argument, Command
label_desc: Use image node_id 2 for calling a global function with example usage: _get_type_name(obj) and returns: str, type_name