import base64


def bytes_to_base64(value):
    """
    encodes the given raw bytes into base64 encoded bytes.

    :param bytes value: raw bytes value to be encoded into base64 bytes.

    :returns: base64 encoded bytes.

    :rtype: bytes
    """

    return base64.b64encode(value)