code: def _get_name(func: Callable) -> str:
      """Get the name of the function.
  
      Parameters
      ----------
      func: Callable
          The function whose name has to be returned, should be either a function or an
          object that is callable.
  
      Returns
      -------
      str
          The name of ``func`` in case of a function, or
          - the name of the wrapped function in case of functools.partial.
          - the name of the class in case of a callable object.
  
      """
      assert callable(
          func
      ), f"The given argument {func} is not callable!"
      try:
          return func.__name__
      except AttributeError:
          if isinstance(func, functools.partial):
              return func.func.__name__
          return type(func).__name__
  
file_path: tsflex/tsflex/features/function_wrapper.py
imports: import functools
  from typing import Any, Callable, List, Optional, Union
  import numpy
  import pandas
  from ..None import __pdoc__
  from ..utils.classes import FrozenClass
  from ..utils.data import SUPPORTED_STROLL_TYPES
label_desc: Use image node_id 1 for calling a global function with example usage: _get_name(func) and returns: func, type, func