code: def check(self, dt):
      d = num2date(dt)
      ddate = d.date()
      if self._lastcall == ddate:  # not repeating, awaiting date change
          return False
  
      if d > self._nexteos:
          if self._isdata:  # eos provided by data
              nexteos, _ = self._tzdata._getnexteos()
          else:  # generic eos
              nexteos = datetime.combine(ddate, TIME_MAX)
          self._nexteos = nexteos
          self._reset_when()
  
      if ddate > self._curdate:  # day change
          self._curdate = ddate
          ret = self._check_month(ddate)
          if ret:
              ret = self._check_week(ddate)
          if ret and self.p.allow is not None:
              ret = self.p.allow(ddate)
  
          if not ret:
              self._reset_when(ddate)  # this day won't make it
              return False  # timer target not met
  
      # no day change or passed month, week and allow filters on date change
      dwhen = self._dwhen
      dtwhen = self._dtwhen
      if dtwhen is None:
          dwhen = datetime.combine(ddate, self._when)
          if self.p.offset:
              dwhen += self.p.offset
  
          self._dwhen = dwhen
  
          if self._isdata:
              self._dtwhen = dtwhen = self._tzdata.date2num(dwhen)
          else:
              self._dtwhen = dtwhen = date2num(dwhen, tz=self._tzdata)
  
      if dt < dtwhen:
          return False  # timer target not met
  
      self.lastwhen = (
          dwhen  # record when the last timer "when" happened
      )
  
      if not self.p.repeat:  # cannot repeat
          self._reset_when(ddate)  # reset and mark as called on ddate
      else:
          if d > self._nexteos:
              if self._isdata:  # eos provided by data
                  nexteos, _ = self._tzdata._getnexteos()
              else:  # generic eos
                  nexteos = datetime.combine(ddate, TIME_MAX)
  
              self._nexteos = nexteos
          else:
              nexteos = self._nexteos
  
          while True:
              dwhen += self.p.repeat
              if dwhen > nexteos:  # new schedule is beyone session
                  self._reset_when(ddate)  # reset to original point
                  break
  
              if dwhen > d:  # gone over current datetime
                  self._dtwhen = dtwhen = date2num(
                      dwhen
                  )  # float timestamp
                  # Get the localized expected next time
                  if self._isdata:
                      self._dwhen = self._tzdata.num2date(dtwhen)
                  else:  # assume pytz compatible or None
                      self._dwhen = num2date(dtwhen, tz=self._tzdata)
  
                  break
  
      return True
  
file_path: backtrader/backtrader/timer.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import bisect
  import collections
  from datetime import date, datetime, timedelta
  from itertools import islice
  from .feed import AbstractDataBase
  from .metabase import MetaParams
  from .utils import date2num, num2date
  from .utils.py3 import integer_types, range, with_metaclass
  from .utils import TIME_MAX
label_desc: Use image node_id 6 for calling the Timer obj's underlying member method code with example usage: obj.check(dt) and returns: True, False, False, False