class_docstr: Abstract base class representing a fail-safe control on the behavior of any
  algorithm.
class_docstr_tok: ["Abstract","base","class","representing","a","fail-safe","control","on","the","behavior","of","any","algorithm","."]
docstr: On each call to handle data by TradingAlgorithm, this method should be
  called *exactly once* on each registered AccountControl object.
  
  If the check does not violate this AccountControl's restraint given
  the information in `portfolio` and `account`, this method should
  return None and have no externally-visible side-effects.
  
  If the desired order violates this AccountControl's contraint, this
  method should call self.fail().
docstr_tok: ["On","each","call","to","handle","data","by","TradingAlgorithm",",","this","method","should","be","called","*","exactly","once","*","on","each","registered","AccountControl","object",".","If","the","check","does","not","violate","this","AccountControl","'s","restraint","given","the","information","in","`","portfolio","`","and","`","account","`",",","this","method","should","return","None","and","have","no","externally-visible","side-effects",".","If","the","desired","order","violates","this","AccountControl","'s","contraint",",","this","method","should","call","self.fail","(",")","."]
code: def validate(
      self, _portfolio, _account, _algo_datetime, _algo_current_data
  ):
      """
      On each call to handle data by TradingAlgorithm, this method should be
      called *exactly once* on each registered AccountControl object.
  
      If the check does not violate this AccountControl's restraint given
      the information in `portfolio` and `account`, this method should
      return None and have no externally-visible side-effects.
  
      If the desired order violates this AccountControl's contraint, this
      method should call self.fail().
      """
      raise NotImplementedError
  
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 AccountControl obj's underlying member method code with example usage: obj.validate(_portfolio, _account, _algo_datetime, _algo_current_data) without return types