code: def get_scope_name(stack=0, *args, **kwargs):
      if stack == 0:
          return class_inspect.enclosing_scope_name(*args, **kwargs)
      return get_scope_name(stack - 1, *args, **kwargs)
  
file_path: nilearn/nilearn/_utils/tests/test_class_inspect.py
imports: from sklearn.base import BaseEstimator
  from nilearn._utils import class_inspect
label_desc: Use image node_id 1 for calling a global function with example usage: get_scope_name(stack) and returns: get_scope_name, class_inspect