docstr: Returns the last recurrence before the given datetime instance. The
  inc keyword defines what happens if dt is an occurrence. With
  inc=True, if dt itself is an occurrence, it will be returned. 
docstr_tok: ["Returns","the","last","recurrence","before","the","given","datetime","instance",".","The","inc","keyword","defines","what","happens","if","dt","is","an","occurrence",".","With","inc=True",",","if","dt","itself","is","an","occurrence",",","it","will","be","returned","."]
code: def before(self, dt, inc=False):
      """Returns the last recurrence before the given datetime instance. The
      inc keyword defines what happens if dt is an occurrence. With
      inc=True, if dt itself is an occurrence, it will be returned."""
      if self._cache_complete:
          gen = self._cache
      else:
          gen = self
      last = None
      if inc:
          for i in gen:
              if i > dt:
                  break
              last = i
      else:
          for i in gen:
              if i >= dt:
                  break
              last = i
      return last
  
imports: import calendar
  import datetime
  import heapq
  import itertools
  import re
  import sys
  from functools import wraps
  from warnings import warn
  from six import advance_iterator, integer_types
  from six.moves import _thread, range
  from ._common import weekday
label_desc: Use image node_id 8 for calling the rrulebase obj's underlying member method code with example usage: obj.before(dt, inc) and returns: last