docs: def get_new_service_instance_stub(service_instance, path, ns=None,
                                    version=None):
      '''
      Returns a stub that points to a different path,
      created from an existing connection.
  
      service_instance
          The Service Instance.
  
      path
          Path of the new stub.
  
      ns
          Namespace of the new stub.
          Default value is None
  
      version
          Version of the new stub.
          Default value is None.
      '''
      # For python 2.7.9 and later, the default SSL context has more strict
      # connection handshaking rule. We may need turn off the hostname checking
      # and the client side cert verification.
      context = None
      if sys.version_info[:3] > (2, 7, 8):
          context = ssl.create_default_context()
          context.check_hostname = False
          context.verify_mode = ssl.CERT_NONE
  
      stub = service_instance._stub
      hostname = stub.host.split(':')[0]
      session_cookie = stub.cookie.split('"')[1]
      VmomiSupport.GetRequestContext()['vcSessionCookie'] = session_cookie
      new_stub = SoapStubAdapter(host=hostname,
                                 ns=ns,
                                 path=path,
                                 version=version,
                                 poolSize=0,
                                 sslContext=context)
      new_stub.cookie = stub.cookie
      return new_stub