<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate(reference_tempi, reference_weight, estimated_tempi):
 """Checks that the input annotations to a metric look like valid tempo annotations. Parameters reference_tempi : np.ndarray reference tempo values, in bpm reference_weight : float perceptual weight of slow vs fast in reference estimated_tempi : np.ndarray estimated tempo values, in bpm """

    validate_tempi(reference_tempi, reference=True)
    validate_tempi(estimated_tempi, reference=False)

    if reference_weight < 0 or reference_weight > 1:
        raise ValueError('Reference weight must lie in range [0, 1]')