Python implementation of the protocol described in Naranjo et al. (2013).