<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def double_exponential_moving_average(data, period):
 """ Double Exponential Moving Average. Formula: DEMA = 2*EMA - EMA(EMA) """

    catch_errors.check_for_period_error(data, period)

    dema = (2 * ema(data, period)) - ema(ema(data, period), period)
    return dema