code: def patch(cls):
          
          orig = distutils.core.Distribution
          distutils.core.Distribution = cls
          try:
              yield
          finally:
              distutils.core.Distribution = orig
docs: Replace
          distutils.dist.Distribution with this class
          for the duration of this context.