Dumps a TOMLDocument into a string.

def dumps(data):  # type: (_TOMLDocument) -> str
    """
    Dumps a TOMLDocument into a string.
    """
    if not isinstance(data, _TOMLDocument) and isinstance(data, dict):
        data = item(data)

    return data.as_string()