code: def patch_all():
      # we can't patch distutils.cmd, alas
      distutils.core.Command = setuptools.Command
  
      has_issue_12885 = sys.version_info <= (3, 5, 3)
  
      if has_issue_12885:
          # fix findall bug in distutils (http://bugs.python.org/issue12885)
          distutils.filelist.findall = setuptools.findall
  
      needs_warehouse = (
          sys.version_info < (2, 7, 13)
          or (3, 4) < sys.version_info < (3, 4, 6)
          or (3, 5) < sys.version_info <= (3, 5, 3)
      )
  
      if needs_warehouse:
          warehouse = "https://upload.pypi.org/legacy/"
          distutils.config.PyPIRCCommand.DEFAULT_REPOSITORY = warehouse
  
      _patch_distribution_metadata()
  
      # Install Distribution throughout the distutils
      for module in distutils.dist, distutils.core, distutils.cmd:
          module.Distribution = setuptools.dist.Distribution
  
      # Install the patched Extension
      distutils.core.Extension = setuptools.extension.Extension
      distutils.extension.Extension = setuptools.extension.Extension
      if "distutils.command.build_ext" in sys.modules:
          sys.modules[
              "distutils.command.build_ext"
          ].Extension = setuptools.extension.Extension
  
      patch_for_msvc_specialized_compiler()
  
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 4 for calling a global function with example usage: patch_all() without return types