code: def next_int(self, n=None):
          
          if n is None:
              return javabridge.call(self.jobject, "nextInt", "()I")
          else:
              return javabridge.call(self.jobject, "nextInt", "(I)I", n)
docs: 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