Your comment made me smile because Apache Beam is one of my favorite tools, but it seems nobody outside Spotify has had heard of it.
The bitwise operation dunder methods have no definition outside of integers. So they’re basically freebies to do what you want with.
Honestly I think the Apache Beam API makes a lot of sense.