Return a unique oxidation state according to some criterion

Hello, I’m wondering if there is a way, using pymatgen (maybe in conjunction with something else) retrieving the most common oxidation state of elements, maybe according to reported chemical compositions of some database. As an example, I would like the following command

Out[195]: (-2, 2, 4)

to return a unique most common value in some sense.