<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def next_int(self, n=None):
 """ Next random integer. if n is provided, then between 0 and n-1. :param n: the upper limit (minus 1) for the random integer :type n: int :return: the next random integer :rtype: int """

        if n is None:
            return javabridge.call(self.jobject, "nextInt", "()I")
        else:
            return javabridge.call(self.jobject, "nextInt", "(I)I", n)