<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(module, cls=PVLEncoder, **kwargs):
 """Serialize ``module`` as a pvl module formated byte string. :param module: a ```PVLModule``` or ```dict``` like object to serialize :param cls: the encoder class used to serialize the pvl module. You may use the default ``PVLEncoder`` class or provided encoder formats such as the ```IsisCubeLabelEncoder``` and ```PDSLabelEncoder``` classes. You may also provided a custom sublcass of ```PVLEncoder``` :param **kwargs: the keyword arguments to pass to the encoder class. :returns: a byte string encoding of the pvl module """

    stream = io.BytesIO()
    cls(**kwargs).encode(module, stream)
    return stream.getvalue()