def METHOD_NAME(players, output, boards, balance, count):
    player_data = get_player_data(players)
    leagues = [make_league(player_data, boards, balance) for _ in range(count)]
    max_happiness = max([total_happiness(l['teams']) for l in leagues])
    happy_leagues = [l for l in leagues if total_happiness(l['teams']) == max_happiness]
    print(f"{len(happy_leagues)} leagues of happiness {max_happiness} found")
    for i, league in enumerate(happy_leagues):
        print(f"Happy League {i}")
        generate_print_output(league)
    for league in happy_leagues:
        league['teams'] = reduce_variance(league['teams'])
    min_range_league = min(happy_leagues, key=lambda l: team_rating_range(l['teams']))
    print("Minimum rating range happy league")
    generate_print_output(min_range_league)