def object_to_bytes(object, encoding='utf-8'):
    """
    Translate an object into its string form
    and then convert that string into its raw bytes form.
    :param object: An object to convert into a bytes literal.
    :param encoding: A string value indicating the encoding to use.
                     Defaults to 'utf-8'.
    :return: the converted bytes object.
    """
    return bytes(str(object), encoding=encoding)