def _is_tweet_toplevel(tweet):
    """is_tweet_toplevel detects if a tweet is a top level tweet.
    Top level tweets are identified by not being a response to another tweet, 
    or being a retweet of another tweet.

    Args:
        tweet ([Status]): A tweepy Status object
    
    Returns:
        bool
    """

    reply_to = tweet.in_reply_to_status_id
    retweet_of = getattr(tweet, "retweeted_status", None)

    # If the tweet is a reply to another tweet, or a retweet of a different
    # tweet, it is not top level
    if reply_to or retweet_of:
        return False

    return True