code: def get_unpatched_class(cls):
      """Protect against re-patching the distutils if reloaded
  
      Also ensures that no other distutils extension monkeypatched the distutils
      first.
      """
      external_bases = (
          cls
          for cls in _get_mro(cls)
          if not cls.__module__.startswith("setuptools")
      )
      base = next(external_bases)
      if not base.__module__.startswith("distutils"):
          msg = "distutils has already been patched by %r" % cls
          raise AssertionError(msg)
      return base
  
file_path: catboost/contrib/python/setuptools/py2/setuptools/monkey.py
imports: import sys
  import distutils.filelist
  import platform
  import types
  import functools
  from importlib import import_module
  import inspect
  from setuptools.extern import six
  import setuptools
label_desc: Use image node_id 3 for calling a global function with example usage: get_unpatched_class(cls) and returns: base