code: def parse_instancename(parser, event, node): #pylint: disable=unused-argument
      
  
      classname = _get_required_attribute(node, 'CLASSNAME')
      keybindings = []
  
      (next_event, next_node) = six.next(parser)
  
      if _is_start(next_event, next_node, 'KEYBINDING'):
  
          keybindings.append(parse_keybinding(parser, next_event, next_node))
  
          while 1:
  
              (next_event, next_node) = six.next(parser)
  
              if _is_end(next_event, next_node, 'INSTANCENAME'):
                  break
  
              if _is_start(next_event, next_node, 'KEYBINDING'):
                  keybindings.append(
                      parse_keybinding(parser, next_event, next_node))
              else:
                  raise ParseError('Expecting KEYBINDING element')
  
      if _is_end(next_event, next_node, 'INSTANCENAME'):
          pass
  
      elif _is_start(next_event, next_node, 'KEYVALUE'):
          keybindings.append(('', parse_keyvalue(parser, next_event, next_node)))
  
      elif _is_start(next_event, next_node, 'VALUE.REFERENCE'):
          keybindings.append(
              parse_value_reference(parser, next_event, next_node))
  
      else:
          raise ParseError(
              'Expecting KEYBINDING* | KEYVALUE? | VALUE.REFERENCE')
  
      return CIMInstanceName(classname, keybindings)
docs: Parse INSTANCENAME element returning CIMInstancename containing
         classname and keybindings
              <!ELEMENT INSTANCENAME (KEYBINDING* | KEYVALUE? | VALUE.REFERENCE?)>
              <!ATTLIST INSTANCENAME
                    %ClassName;
              >