A Generalized Index of Fractionalization