<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def post_tweet(self, auth_secret, tweet):
 """Post a tweet. Parameters auth_secret: str The authentication secret of the logged-in user. tweet: str The tweet that will be posted. Returns ------- bool True if the tweet is successfully posted, False otherwise. result None if the tweet is successfully posted, a dict containing the error string with the key ERROR_KEY otherwise. Note ---- Possible error strings are listed as below: - ERROR_NOT_LOGGED_IN """

        result = {pytwis_constants.ERROR_KEY: None}

        # Check if the user is logged in.
        loggedin, userid = self._is_loggedin(auth_secret)
        if not loggedin:
            result[pytwis_constants.ERROR_KEY] = pytwis_constants.ERROR_NOT_LOGGED_IN
            return (False, result)

        # Get the next user-id. If the key "next_user_id" doesn't exist,
        # it will be created and initialized as 0, and then incremented by 1.
        post_id = self._rc.incr(pytwis_constants.NEXT_TWEET_ID_KEY)
        post_id_key = pytwis_constants.TWEET_KEY_FORMAT.format(post_id)

        post_id_timeline_key = pytwis_constants.USER_TIMELINE_KEY_FORMAT.format(userid)
        post_id_user_key = pytwis_constants.USER_TWEETS_KEY_FORMAT.format(userid)

        follower_zset_key = pytwis_constants.FOLLOWER_KEY_FORMAT.format(userid)
        followers = self._rc.zrange(follower_zset_key, 0, -1)

        unix_time = int(time.time())
        with self._rc.pipeline() as pipe:
            pipe.multi()
            # Store the tweet with its user ID and UNIX timestamp.
            pipe.hmset(post_id_key,
                       {pytwis_constants.TWEET_USERID_KEY: userid,
                        pytwis_constants.TWEET_UNIXTIME_KEY: unix_time,
                        pytwis_constants.TWEET_BODY_KEY: tweet})

            # Add the tweet to the user timeline.
            pipe.lpush(post_id_timeline_key, post_id)

            # Add the tweet to the tweet list posted by the user.
            pipe.lpush(post_id_user_key, post_id)

            # Write fanout the tweet to all the followers' timelines.
            for follower in followers:
                post_id_follower_key = \
                    pytwis_constants.USER_TIMELINE_KEY_FORMAT.format(follower)
                pipe.lpush(post_id_follower_key, post_id)

            # Add the tweet to the general timeline and left trim the general timeline
            # to only retain the latest GENERAL_TIMELINE_LIST_MAX_TWEET_CNT tweets.
            pipe.lpush(pytwis_constants.GENERAL_TIMELINE_KEY, post_id)
            pipe.ltrim(pytwis_constants.GENERAL_TIMELINE_KEY,
                       0,
                       pytwis_constants.GENERAL_TIMELINE_MAX_TWEET_CNT - 1)

            pipe.execute()

        return (True, result)