It's actually somewhat particular to how bihar calculates this, although all of that is arguable somewhat generic. I'd opt for leaving here and pulling it out when we want to reuse.