code: def crossvalidate_model(self, classifier, data, num_folds, rnd, output=None):
          
          if output is None:
              generator = []
          else:
              generator = [output.jobject]
          javabridge.call(
              self.jobject, "crossValidateModel",
              "(Lweka/classifiers/Classifier;Lweka/core/Instances;ILjava/util/Random;[Ljava/lang/Object;)V",
              classifier.jobject, data.jobject, num_folds, rnd.jobject, generator)
docs: Crossvalidates the model using the specified data, number of folds and random number generator wrapper.
  
          :param classifier: the classifier to cross-validate
          :type classifier: Classifier
          :param data: the data to evaluate on
          :type data: Instances
          :param num_folds: the number of folds
          :type num_folds: int
          :param rnd: the random number generator to use
          :type rnd: Random
          :param output: the output generator to use
          :type output: PredictionOutput