code: def parse_keyvalue(parser, event, node): #pylint: disable=unused-argument
      
  
      valuetype = _get_required_attribute(node, 'VALUETYPE')
  
      # TODO 2/16 KS: Type attribute not used. Extend to use. Type  was late
      #               extension to spec to allow real types.
      cim_type = _get_attribute(node, 'TYPE')  # pylint: disable=unused-variable
  
      (next_event, next_node) = six.next(parser)
  
      if next_event != pulldom.CHARACTERS:
          raise ParseError('Expecting character data')
  
      value = next_node.nodeValue
  
      if valuetype == 'string':
          pass
  
      elif valuetype == 'boolean':
  
          # CIM-XML says "These values MUST be treated as
          # case-insensitive" (even though the XML definition
          # requires them to be lowercase.)
  
          p = value.strip().lower()
  
          if p == 'true':
              value = True
          elif p == 'false':
              value = False
          else:
              raise ParseError('invalid boolean value %r' % p)
  
      elif valuetype == 'numeric':
  
          try:
  
              # XXX: Use TYPE attribute to create named CIM type.
              # if 'TYPE' in attrs(tt):
              #    return tocimobj(attrs(tt)['TYPE'], p.strip())
  
              # XXX: Would like to use long() here, but that tends to cause
              # trouble when it's written back out as '2L'
              # pylint: disable=redefined-variable-type
              # Redefined from bool to int
              # pylint: disable=redefined-variable-type
              value = int(value.strip(), 0)
  
          except ValueError:
              raise ParseError(
                  'invalid numeric value "%s"' % value)
  
      else:
          raise ParseError('Invalid VALUETYPE')
  
      _get_end_event(parser, 'KEYVALUE')
  
      return value
docs: Parse CIM/CML KEYVALUE element and return key value based on
         VALUETYPE  or TYPE (future) information