code: def _func_name(func, cls=None):
      """Get the name."""
      parts = []
      if cls is not None:
          module = inspect.getmodule(cls)
      else:
          module = inspect.getmodule(func)
      if module:
          parts.append(module.__name__)
      if cls is not None:
          parts.append(cls.__name__)
      parts.append(func.__name__)
      return ".".join(parts)
  
file_path: mne-python/mne/tests/test_docstring_parameters.py
imports: import importlib
  import inspect
  import re
  from pathlib import Path
  from pkgutil import walk_packages
  import pytest
  import mne
  from mne.utils import _pl, _record_warnings
label_desc: Use image node_id 1 for calling a global function with example usage: _func_name(func, cls) and returns: str