code: def close_shell(self, shell_id):
          
          message_id = uuid.uuid4()
          req = {'env:Envelope': self._get_soap_header(
              resource_uri='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd',  # NOQA
              action='http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete',
              shell_id=shell_id,
              message_id=message_id)}
  
          # SOAP message requires empty env:Body
          req['env:Envelope'].setdefault('env:Body', {})
  
          res = self.send_message(xmltodict.unparse(req))
          root = ET.fromstring(res)
          relates_to = next(
              node for node in root.findall('.//*')
              if node.tag.endswith('RelatesTo')).text
          # TODO change assert into user-friendly exception
          assert uuid.UUID(relates_to.replace('uuid:', '')) == message_id
docs: Close the shell
          @param string shell_id: The shell id on the remote machine.
           See #open_shell
          @returns This should have more error checking but it just returns true
           for now.
          @rtype bool