<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(obj, indent=None, default=None, sort_keys=False, **kw):
 """Dump string."""

    return YAMLEncoder(indent=indent, default=default, sort_keys=sort_keys, **kw).encode(obj)