Given a discrete list of elements L, and a probability mass function over the list, guesswork for any individual x in L counts the number of elements more likey than x.
Here we provide code for reproducing the approximations on the PMF of guesswork in "A Characterization of Guesswork on Swiftly Tilting Curves," IEEE Trans. Inf. Theory, Jan. 2019 (https://arxiv.org/pdf/1801.09021.pdf).