class_docstr: Interface class whose subclasses should implement a handle method that
  Twitter clients can delegate to.
class_docstr_tok: ["Interface","class","whose","subclasses","should","implement","a","handle","method","that","Twitter","clients","can","delegate","to","."]
docstr: Validate date limits.
docstr_tok: ["Validate","date","limits","."]
code: def check_date_limit(self, data, verbose=False):
      """
      Validate date limits.
      """
      if self.upper_date_limit or self.lower_date_limit:
          date_fmt = "%a %b %d %H:%M:%S +0000 %Y"
          tweet_date = datetime.strptime(
              data["created_at"], date_fmt
          ).replace(tzinfo=timezone.utc)
          if (
              self.upper_date_limit
              and tweet_date > self.upper_date_limit
          ) or (
              self.lower_date_limit
              and tweet_date < self.lower_date_limit
          ):
              if self.upper_date_limit:
                  message = "earlier"
                  date_limit = self.upper_date_limit
              else:
                  message = "later"
                  date_limit = self.lower_date_limit
              if verbose:
                  print(
                      "Date limit {} is {} than date of current tweet {}".format(
                          date_limit, message, tweet_date
                      )
                  )
              self.do_stop = True
  
file_path: nltk/nltk/twitter/api.py
imports: import time
  from abc import ABCMeta, abstractmethod
  from datetime import datetime, timedelta, timezone, tzinfo
label_desc: Use image node_id 4 for calling the TweetHandlerI obj's underlying member method code with example usage: obj.check_date_limit(data, verbose) without return types