code: def fetch_intersphinx_inventory(uri):
      
  
      # See https://stackoverflow.com/a/30981554
      class MockConfig(object):
          intersphinx_timeout = None
          tls_verify = False
  
      class MockApp(object):
          srcdir = ''
          config = MockConfig()
  
          def warn(self, msg):
              warnings.warn(msg)
  
      return intersphinx.fetch_inventory(MockApp(), '', uri)
docs: Fetch and read an intersphinx inventory file at a specified uri,
      which can either be a url (e.g. http://...) or a local file system
      filename.