code: def display_name(fn: Callable) -> str:
      if hasattr(fn, "__qualname__"):
          return fn.__qualname__
      elif hasattr(fn, "__name__"):
          return fn.__name__
      else:
          return str(fn)
  
file_path: pytorch/torch/onnx/_internal/diagnostics/infra/formatter.py
imports: from __future__ import annotations
  import dataclasses
  import json
  import re
  import traceback
  from typing import Any, Callable, Dict, List, Optional, Union
  from torch._logging import LazyString
  from torch.onnx._internal import _beartype
  from torch.onnx._internal.diagnostics.infra import sarif
label_desc: Use image node_id 8 for calling a global function with example usage: display_name(fn) and returns: fn, fn, str