def from_binary(bin_data: str, delimiter: str = " ") -> bytes:
    """Converts binary string into bytes object"""
    if delimiter == "":
        data = [bin_data[i:i+8] for i in range(0, len(bin_data), 8)]
    else:
        data = bin_data.split(delimiter)
    data = [int(byte, 2) for byte in data]
    return bytes(data)