code: def to_dc(data):
      
      root = odict[
          "metadata": odict[
              "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
              "@xmlns:dc": "http://purl.org/dc/elements/1.1/",
              "@xmlns:dcterms": "http://purl.org/dc/terms/",
              "@xmlns:rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
          ]
      ]
  
      # map metadata to the root element, skip None values
      for key, val in _convert_metadata(_remove_none(data)).iteritems():
          if val is None:
              continue
  
          if isinstance(val, basestring) and not val.strip():
              continue
  
          if isinstance(val, str):
              val = val.decode("utf-8")
  
          root["metadata"][key] = val
  
      return unparse(root, pretty=True, indent="    ")
docs: Convert WA-KAT `data` to Dublin core XML.
  
      Args:
          data (dict): Nested WA-KAT data. See tests for example.
  
      Returns:
          unicode: XML with dublin core.