code: def __construct_request_xml(self, username, encoded_password):
      logging.debug(
          "constructing request with %s - %s",
          username,
          encoded_password,
      )
      soap_schema = self.__schemas["soap"]
      datamanager_schema = self.__schemas["data"]
  
      element = etree.Element("{%s}Envelope" % soap_schema)
      body = etree.SubElement(element, "{%s}Body" % soap_schema)
      userelement = etree.SubElement(
          body, "{%s}UserElement" % datamanager_schema
      )
  
      user = etree.SubElement(userelement, "user")
      uid = etree.SubElement(user, "id")
      uid.text = "0"
  
      uid = etree.SubElement(user, "name")
      uid.text = username
  
      uid = etree.SubElement(user, "password")
      uid.text = encoded_password
  
      uid = etree.SubElement(user, "threshold")
      uid.text = "0"
  
      logging.debug(etree.tostring(element))
      return etree.tostring(element)
  
file_path: datalad/datalad/support/third/nda_aws_token_generator.py
imports: import binascii
  import hashlib
  import logging
  import xml.etree.ElementTree
  import sys
label_desc: Use image node_id 4 for calling the NDATokenGenerator obj's underlying member method code with example usage: obj.__construct_request_xml(username, encoded_password) and returns: etree