code: def parse_instancename(self, tup_tree):
          
  
          self.check_node(tup_tree, 'INSTANCENAME', ('CLASSNAME',))
  
          k = kids(tup_tree)
          if not k:
              # probably not ever going to see this, but it's valid
              # according to the grammar
              return CIMInstanceName(attrs(tup_tree)['CLASSNAME'], {})
  
          kid0 = k[0]
          k0_name = name(kid0)
  
          classname = attrs(tup_tree)['CLASSNAME']
  
          if k0_name in ('KEYVALUE', 'VALUE.REFERENCE'):
              if len(k) != 1:
                  raise CIMXMLParseError(
                      _format("Element {0!A} has more than one child element "
                              "{1!A} (expecting child elements "
                              "(KEYBINDING* | KEYVALUE? | VALUE.REFERENCE?))",
                              name(tup_tree), k0_name),
                      conn_id=self.conn_id)
  
              val = self.parse_any(kid0)
              return CIMInstanceName(classname, {None: val})
  
          if k0_name == 'KEYBINDING':
              kbs = {}
              # self.list_of_various() has the same effect as self.list_of_same()
              # when used with a single allowed child element, but is a little
              # faster.
              for key_bind in self.list_of_various(tup_tree, ('KEYBINDING',)):
                  kbs.update(key_bind)
              return CIMInstanceName(classname, kbs)
  
          raise CIMXMLParseError(
              _format("Element {0!A} has invalid child elements {1!A} "
                      "(expecting child elements "
                      "(KEYBINDING* | KEYVALUE? | VALUE.REFERENCE?))",
                      name(tup_tree), k),
              conn_id=self.conn_id)
docs: Parse an INSTANCENAME element and return the instance path it
          represents as a CIMInstanceName object.
  
            ::
  
              <!ELEMENT INSTANCENAME (KEYBINDING* | KEYVALUE? |
                                      VALUE.REFERENCE?)>
              <!ATTLIST INSTANCENAME
                  %ClassName;>