<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_max_cost(self, class_value, inst=None):
 """ Gets the maximum cost for a particular class value. :param class_value: the class value to get the maximum cost for :type class_value: int :param inst: the Instance :type inst: Instance :return: the cost :rtype: float """

        if inst is None:
            return javabridge.call(
                self.jobject, "getMaxCost", "(I)D", class_value)
        else:
            return javabridge.call(
                self.jobject, "getElement", "(ILweka/core/Instance;)D", class_value, inst.jobject)