code: def metadata_to_md_options(metadata):
      
  
      return ' '.join(["{}={}".format(key, dumps(metadata[key]))
                       if metadata[key] is not None else key for key in metadata])
docs: Encode {'class':None, 'key':'value'} into 'class key="value"'