code: def get_func_name(func: Callable) -> str:
      if hasattr(func, "__name__"):
          return func.__name__
      elif hasattr(func, "__class__"):
          return func.__class__.__name__
      raise ValueError("Could not infer name for function '{func}'")
  
imports: import time
  from typing import Any, Callable, List, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch_geometric.utils import is_torch_sparse_tensor
label_desc: Use image node_id 3 for calling a global function with example usage: get_func_name(func) and returns: func, func