<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _wva(values, weights):
 """ Calculates a weighted average """

        assert len(values) == len(weights) and len(weights) > 0
        return sum([mul(*x) for x in zip(values, weights)]) / sum(weights)