docs: def write_xml(self):
          '''
              Writes a VocabularyKey Xml as per Healthvault schema.
  
              :returns: lxml.etree.Element representing a single VocabularyKey
          '''
          key = None
          if self. language is not None:
              lang = {}
              lang['{http://www.w3.org/XML/1998/namespace}lang'] = self.language
              key = etree.Element('vocabulary-key', attrib=lang)
          else:
              key = etree.Element('vocabulary-key')
  
          name = etree.Element('name')
          name.text = self.name
          key.append(name)
  
          if self.family is not None:
              family = etree.Element('family')
              family.text = self.family
              key.append(family)
  
          if self.version is not None:
              version = etree.Element('version')
              version.text = self.version
              key.append(version)
  
          if self.code_value is not None:
              code_value = etree.Element('code-value')
              code_value.text = self.code_value
              key.append(code_value)
  
          return key