code: def apply_cost_matrix(self, data, rnd):
          
          return Instances(
              javabridge.call(
                  self.jobject, "applyCostMatrix", "(Lweka/core/Instances;Ljava/util/Random;)Lweka/core/Instances;",
                  data.jobject, rnd.jobject))
docs: Applies the cost matrix to the data.
  
          :param data: the data to apply to
          :type data: Instances
          :param rnd: the random number generator
          :type rnd: Random