def calc_cusp_kappa_cost(self, controls: list[Control], fork_y) -> float:
        """Calculate the cost of a list of controls.

        Args:
            controls (list[Control]): The list of controls.

        Returns:
            float: The cost of the controls.
        """
        cost = 0

        distance = sum(abs(control.delta_s) for control in controls)

        cusp = 0
        kappa_diff = 0

        kappa_discontinuity = 0

        flatness = 0

        for contol in range(len(controls) - 1):
            if controls[contol].delta_s * controls[contol + 1].delta_s < 0:
                cusp += 1

            if controls[contol].kappa * controls[contol + 1].kappa < 0:
                kappa_discontinuity += 1
            
            kappa_diff += abs(controls[contol].kappa - controls[contol + 1].kappa)

            flatness += abs(controls[contol].kappa) * abs(controls[contol].delta_s)
                

        cost += cusp * self.cusp_cost
        # cost += kappa_diff * 0.1
        # cost += distance * 0.1
        cost += flatness * 0.1
        # cost += kappa_discontinuity * 0.1
        # cost += abs(fork_y) * 0.1

        return cost
to c++ Please reply with exactly 5 paragraphs and separate each paragraph with two new lines. The very last paragraph must start with the word "many".
user