<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exponential(data):
 """ Creates a segment cost function for a time series with a exponential distribution with changing mean Args: data (:obj:`list` of float):
 1D time series data Returns: function: Function with signature (int, int) -> float where the first arg is the starting index, and the second is the last arg. Returns the cost of that segment """

    data = np.hstack(([0.0], np.array(data)))
    cumm = np.cumsum(data)

    def cost(s, t):
        """ Cost function for exponential distribution with changing mean

        Args:
            start (int): start index
            end (int): end index
        Returns:
            float: Cost, from start to end
        """
        return -1*(t-s) * (np.log(t-s) - np.log(cumm[t] - cumm[s]))

    return cost