<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def hull_moving_average(data, period):
 """ Hull Moving Average. Formula: HMA = WMA(2*WMA(n/2) - WMA(n)), sqrt(n) """

    catch_errors.check_for_period_error(data, period)
    hma = wma(
        2 * wma(data, int(period/2)) - wma(data, period), int(np.sqrt(period))
        )
    return hma