code: def patch_super():
      back = inspect.currentframe().f_back
      if not back or "__class__" not in back.f_locals:
          raise RuntimeError(
              "Calling super() in the incorrect context."
          )
  
      patch_super_cls = back.f_locals["__class__"].__patch_super__
      patch_self = back.f_locals.get("self")
  
      class _SuperAccessor:
          def __getattribute__(self, item):
              func = getattr(patch_super_cls, item)
              if func == mock.DEFAULT:
                  raise AttributeError(
                      f"super object has no attribute '{item}'"
                  )
              if patch_self:
                  return types.MethodType(func, patch_self)
              return func
  
      return _SuperAccessor()
  
imports: import fnmatch
  import functools
  import inspect
  import itertools
  import logging
  import os
  import sys
  import time
  import types
  from typing import Dict
  import numpy
  import pandas
  import pytest
  from ..core.operand import OperandStage
  from ..utils import lazy_import
label_desc: Use image node_id 4 for calling a global function with example usage: patch_super() and returns: _SuperAccessor, func, types