def get_embedded_tweet(tweet):
    """
    Get the retweeted Tweet OR the quoted Tweet and return it as a dictionary

    Args:
        tweet (Tweet): A Tweet object (not simply a dict)

    Returns:
        dict (or None, if the Tweet is neither a quote tweet or a Retweet):
        a dictionary representing the quote Tweet or the Retweet
    """
    if tweet.retweeted_tweet is not None:
        return tweet.retweeted_tweet
    elif tweet.quoted_tweet is not None:
        return tweet.quoted_tweet
    else:
        return None
Get the retweeted Tweet OR the quoted Tweet and return it as a dictionary

    Args:
        tweet (Tweet): A Tweet object (not simply a dict)

    Returns:
        dict (or None, if the Tweet is neither a quote tweet or a Retweet):
        a dictionary representing the quote Tweet or the Retweet