def _rand_int(self, space, integer):
        random = self.random.random()
        max = Coerce.int(space, integer)
        if max <= 0:
            raise space.error(space.w_ArgumentError, "invalid argument")
        else:
            return space.newint(int(random * max))
dataset/ETHPy150Open topazproject/topaz/topaz/objects/randomobject.py/W_RandomObject._rand_int/original