code: def catch_timeout(f):
      
      def new_f(self, *args, **kwargs):
          try:
              return f(self, *args, **kwargs)
          except (requests.exceptions.ReadTimeout,
                  requests.packages.urllib3.exceptions.ReadTimeoutError) as e:
              log.warning("caught read timeout: %s", e)
              self.connect()
              return f(self, *args, **kwargs)
      return new_f
docs: A decorator to handle read timeouts from Twitter.