<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(self, _portfolio, _account, _algo_datetime, _algo_current_data):
 """ Fail if the leverage is greater than the allowed leverage. """

        if _account.leverage > self.max_leverage:
            self.fail()