<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def eval(self, id1, id2, inst1):
 """ Computes the result of the kernel function for two instances. If id1 == -1, eval use inst1 instead of an instance in the dataset. :param id1: the index of the first instance in the dataset :type id1: int :param id2: the index of the second instance in the dataset :type id2: int :param inst1: the instance corresponding to id1 (used if id1 == -1) :type inst1: Instance """

        jinst1 = None
        if inst1 is not None:
            jinst1 = inst1.jobject
        return javabridge.call(self.jobject, "eval", "(IILweka/core/Instance;)D", id1, id2, jinst1)