def perfect_hash(self, num, size):
        """ Translate a number to another unique number, using a perfect hash function.
        """
        period = self.get_period(size)
        offset = self.get_offset(size)
        return (size+1) % ((num+offset)*(size/period)) + 1
dataset/ETHPy150Open willhardy/Roll-Your-Own/rollyourown/commerce/utils/friendly_id.py/FriendlyID.perfect_hash/swapped operands of `%`