code: def dump_to_string(self, cnf, **opts):
          
          tree = container_to_etree(cnf, **opts)
          buf = BytesIO()
          etree_write(tree, buf)
          return buf.getvalue()
docs: :param cnf: Configuration data to dump
          :param opts: optional keyword parameters
  
          :return: string represents the configuration