class_docstr: Base class for event identification. You should subclass this to implement
  the event identification logic.
docstr: Override (**mandatory**) to determine if an event took place in the last bar (bards[-1]).
  
  :param instrument: Instrument identifier.
  :type instrument: string.
  :param bards: The BarDataSeries for the given instrument.
  :type bards: :class:`pyalgotrade.dataseries.bards.BarDataSeries`.
  :rtype: boolean.
docstr_tok: ["Override","(","*","*","mandatory","*","*",")","to","determine","if","an","event","took","place","in","the","last","bar","(","bards","[","-1","]",")",".",":","param","instrument",":","Instrument","identifier",".",":","type","instrument",":","string",".",":","param","bards",":","The","BarDataSeries","for","the","given","instrument",".",":","type","bards",":",":","class",":","`","pyalgotrade.dataseries.bards.BarDataSeries","`",".",":","rtype",":","boolean","."]
code: def eventOccurred(self, instrument, bards):
      """Override (**mandatory**) to determine if an event took place in the last bar (bards[-1]).
  
      :param instrument: Instrument identifier.
      :type instrument: string.
      :param bards: The BarDataSeries for the given instrument.
      :type bards: :class:`pyalgotrade.dataseries.bards.BarDataSeries`.
      :rtype: boolean.
      """
      raise NotImplementedError()
  
imports: import numpy
  import matplotlib.pyplot
  from six.moves import xrange
  from pyalgotrade.technical import roc
  from pyalgotrade import dispatcher
label_desc: Use image node_id 1 for calling the Predicate obj's underlying member method code with example usage: obj.eventOccurred(instrument, bards) without return types