<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def embedded_tweet(self):
 """ Get the retweeted Tweet OR the quoted Tweet and return it as a Tweet object Returns: Tweet (or None, if the Tweet is neither a quote tweet or a Retweet):
 a Tweet representing the quote Tweet or the Retweet (see tweet_embeds.get_embedded_tweet, this is that value as a Tweet) Raises: NotATweetError: if embedded tweet is malformed """

        embedded_tweet = tweet_embeds.get_embedded_tweet(self)
        if embedded_tweet is not None:
            try:
                return Tweet(embedded_tweet)
            except NotATweetError as nate:
                raise(NotATweetError("The embedded tweet payload {} appears malformed." +
                                     " Failed with '{}'".format(embedded_tweet, nate)))
        else:
            return None