<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tob(data, enc='utf8'):
 """ Convert anything to bytes """

    return data.encode(enc) if isinstance(data, six.text_type) else bytes(data)