code: def setup(self, settings):
          '''
          Setup redis and tldextract
          '''
          self.extract = tldextract.TLDExtract()
          self.redis_conn = redis.Redis(host=settings['REDIS_HOST'],
                                        port=settings['REDIS_PORT'],
                                        db=settings.get('REDIS_DB'))
  
          try:
              self.redis_conn.info()
              self.logger.debug("Connected to Redis in ZookeeperHandler")
          except ConnectionError:
              self.logger.error("Failed to connect to Redis in ZookeeperHandler")
              # plugin is essential to functionality
              sys.exit(1f setup(self, settings):
          '''
          Setup redis and tldextract
          '''
          self.extract = tldextract.TLDExtract()
          self.redis_conn = redis.Redis(host=settings['REDIS_HOST'],
                                        port=settings['REDIS_PORT'],
                                        db=settings.get('REDIS_DB'))
  
          try:
              self.redis_conn.info()
              self.logger.debug("Connected to Redis in ZookeeperHandler")
          except ConnectionError:
              self.logger.error("Failed to connect to Redis in ZookeeperHandler")
              # plugin is essential to functionality
              sys.exit(1)
docs: Setup redis and tldextract