<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dumps(value):
 """ Dumps a data structure to TOML source code. The given value must be either a dict of dict values, a dict, or a TOML file constructed by this module. """


    from contoml.file.file import TOMLFile

    if not isinstance(value, TOMLFile):
        raise RuntimeError("Can only dump a TOMLFile instance loaded by load() or loads()")

    return value.dumps()