code: def create_key_info_node(security_token):
      
      key_info = etree.Element(ns_id('KeyInfo', ns.dsns))
  
      sec_token_ref = etree.SubElement(
          key_info, ns_id('SecurityTokenReference', ns.wssens))
      sec_token_ref.set(
          ns_id('TokenType', ns.wssens), security_token.get('ValueType'))
  
      reference = etree.SubElement(sec_token_ref, ns_id('Reference', ns.wssens))
      reference.set('ValueType', security_token.get('ValueType'))
      reference.set('URI', '#%s' % security_token.get(WSU_ID))
      return key_info
docs: Create the KeyInfo node for WSSE.
  
      Note that this currently only supports BinarySecurityTokens
  
      Example of the generated XML:
  
          <ds:KeyInfo Id="KI-24C56C5B3448F4BE9D141094243396829">
              <wsse:SecurityTokenReference
                  wsse11:TokenType="{{ BINARY_TOKEN_TYPE }}">
                  <wsse:Reference
                      URI="#X509-24C56C5B3448F4BE9D141094243396828"
                      ValueType="{{ BINARY_TOKEN_TYPE }}"/>
             </wsse:SecurityTokenReference>
          </ds:KeyInfo>