docs: def doc_metadata(doc):
      """Create a metadata dict from a MetatabDoc, for Document conversion"""
  
      r = doc['Root'].as_dict()
      r.update(doc['Contacts'].as_dict())
      r['author'] = r.get('author', r.get('creator', r.get('wrangler')))
  
      return r