def get_fraction_of_tweets_in_language(tweets):
    """Returns fraction of languages in a tweet dataframe as a dictionary

    Args:
        tweets (pandas.DataFrame): Tweet DataFrame as returned by `get_latest_tweets`
    Returns:
        language_fractions (dict): {languagecode (str): fraction (float)}
    """

    language_fractions = tweets['lang'].value_counts(normalize=True)

    language_fractions = language_fractions.to_dict()

    return language_fractions