<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_generator(tweet):
 """ Get information about the application that generated the Tweet Args: tweet (Tweet):
 A Tweet object (or a dictionary) Returns: dict: keys are 'link' and 'name', the web link and the name of the application Example: {'link': 'http://twitter.com', 'name': 'Twitter Web Client'} {'link': 'http://twitter.com', 'name': 'Twitter Web Client'} """

    if is_original_format(tweet):
        if sys.version_info[0] == 3 and sys.version_info[1] >= 4:
            parser = GeneratorHTMLParser(convert_charrefs=True)
        else:
            parser = GeneratorHTMLParser()
        parser.feed(tweet["source"])
        return {"link": parser.generator_link,
                "name": parser.generator_name}
    else:
        return {"link": tweet["generator"]["link"],
                "name": tweet["generator"]["displayName"]}