code: def get_pretty_name(obj):
      """
      Gets a pretty name from `obj`.
      """
      if not hasattr(obj, "__qualname__") and not hasattr(
          obj, "__name__"
      ):
          obj = getattr(obj, "__class__", obj)
      if hasattr(obj, "__qualname__"):
          return obj.__qualname__
      if hasattr(obj, "__name__"):
          return obj.__name__
      return str(obj)
  
imports: import collections
  import os
  import platform
  import re
  import socket
  from contextlib import contextmanager
  from functools import partial
  from types import MethodType
  from typing import OrderedDict
  import torch
  from packaging.version import Version
  from safetensors.torch import save_file
  from ..commands.config.default import write_basic_config
  from ..logging import get_logger
  from ..state import PartialState
  from .constants import FSDP_PYTORCH_VERSION
  from .dataclasses import DistributedType
  from .imports import is_deepspeed_available, is_torch_distributed_available, is_tpu_available
  from .modeling import id_tensor_storage
  from .transformer_engine import convert_model
  from .versions import is_torch_version
label_desc: Use image node_id 8 for calling a global function with example usage: get_pretty_name(obj) and returns: str, obj, obj