def isretweet(tweet):
    """
    Checks if a given tweet is a retweet.
    If tweet is a string, returns True when text starts with 'RT '.
    If tweet is a tweepy.Status object, returns True when ``retweeted_status`` or
    ``retweeted_status_id`` is set.

    Args:
        tweet (str/tweepy.Status/dict): A string, tweepy.Status object, or Status-like dict.

    Returns:
        bool
    """
    try:
        return bool(tweet.retweeted)
    except AttributeError:
        try:
            return bool(tweet.get('retweeted_status') or tweet.get(
                'retweeted_status_id'))
        except AttributeError:
            try:
                return tweet[:3].upper() == 'RT '
            except AttributeError:
                pass
    return False
