def get_top_users_and_orgs(user_data_df, top_repos_df):
    """Gets the top 25 Github Users and top 25 Organizations.

    Note: Top 25 Users are determined based on total followers.
          Top 25 Organizations are determined based on total stars
          for all of an organizations repos.

    Parameters
    ----------
    user_data_df : pandas DataFrame
        DataFrame that contains user data scraped with the scrape_github method.
    top_repos_df : pandas DataFrame
        DataFrame that contains repo data scraped with the scrape_github method.

    Returns
    -------
    tuple of sets
        The top 25 Github Users and top 25 Organizations
    """
    top_users = set(
        user_data_df.sort_values("followers", ascending=False)
        .head(25)
        .query("type == 'User'")["username"]
        .tolist()
    )

    top_organizations = set(
        top_repos_df.query("type == 'Organization'")
        .groupby("username")
        .sum()
        .reset_index()
        .sort_values("stars", ascending=False)["username"]
        .head(25)
        .tolist()
    )

    return top_users, top_organizations