def check_tweet(tweet, validation_checking=False):
    """
    Ensures a tweet is valid and determines the type of format for the tweet.

    Args:
        tweet (dict/Tweet): the tweet payload
        validation_checking (bool): check for valid key structure in a tweet.
    """

    if "id" not in tweet:
        raise NotATweetError("This text has no 'id' key")

    original_format = is_original_format(tweet)

    if original_format:
        _check_original_format_tweet(tweet, validation_checking=validation_checking)
    else:
        _check_activity_streams_tweet(tweet, validation_checking=validation_checking)

    return original_format
def check_tweet ( tweet , validation_checking = False ) : if "id" not in tweet : raise NotATweetError ( "This text has no 'id' key" ) original_format = is_original_format ( tweet ) if original_format : _check_original_format_tweet ( tweet , validation_checking = validation_checking ) else : _check_activity_streams_tweet ( tweet , validation_checking = validation_checking ) return original_format
Ensures a tweet is valid and determines the type of format for the tweet.

    Args:
        tweet (dict/Tweet): the tweet payload
        validation_checking (bool): check for valid key structure in a tweet.