def _calc_type_bit_size(bit_size: int) -> int:
    """Calculate the bit length of a data type which can express the given bit length"""
    if bit_size <= 8:
        return 8
    elif bit_size <= 16:
        return 16
    else:
        return 32