class_docstr: AccountControl representing a limit on the maximum leverage allowed
  by the algorithm.
class_docstr_tok: ["AccountControl","representing","a","limit","on","the","maximum","leverage","allowed","by","the","algorithm","."]
docstr: Fail if the leverage is greater than the allowed leverage.
docstr_tok: ["Fail","if","the","leverage","is","greater","than","the","allowed","leverage","."]
code: 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()
  
imports: import abc
  import logbook
  import pandas
  from six import with_metaclass
  from catalyst.errors import AccountControlViolation, TradingControlViolation
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 2 for calling the MaxLeverage obj's underlying member method code with example usage: obj.validate(_portfolio, _account, _algo_datetime, _algo_current_data) without return types