# DONT'T FORGET TO RENAME THE FILE # # Import the functions you wrote for HW 4. from disjointsets import * # Write a function to find the set of a given statistician. def find_set_statistician(name): # load the data filename = 'statisticiansA-M.txt' with open(filename, 'r') as file: read_strings = file.read().splitlines() # take only unique last names FYI stat_list = [] for string in read_strings: stat_list.append(string.split(',')[0]) stat_list = list(set(stat_list)) stat_list.sort() # read in edges # initialize nodes # perform unions # run test cases print(find_set_statistician('Blackwell')) print(find_set_statistician('Bottou')) print(find_set_statistician('Brad')) print(find_set_statistician('Breslow')) print(find_set_statistician('Wellner')) print(find_set_statistician('Laird')) print(find_set_statistician('Fisher')) print(find_set_statistician('Holmes'))