code: def dumps(cfg):
      '''Serialize ``cfg`` into a libconfig-formatted ``str``
  
      ``cfg`` must be a ``dict`` with ``str`` keys and libconf-supported values
      (numbers, strings, booleans, possibly nested dicts, lists, and tuples).
  
      Returns the formatted string.
      '''
  
      str_file = io.StringIO()
      dump(cfg, str_file)
      return str_file.getvalue(f dumps(cfg):
      '''Serialize ``cfg`` into a libconfig-formatted ``str``
  
      ``cfg`` must be a ``dict`` with ``str`` keys and libconf-supported values
      (numbers, strings, booleans, possibly nested dicts, lists, and tuples).
  
      Returns the formatted string.
      '''
  
      str_file = io.StringIO()
      dump(cfg, str_file)
      return str_file.getvalue()
docs: Serialize ``cfg`` into a libconfig-formatted ``str``
  
      ``cfg`` must be a ``dict`` with ``str`` keys and libconf-supported values
      (numbers, strings, booleans, possibly nested dicts, lists, and tuples).
  
      Returns the formatted string.