def load_users(filename):
    "Load users from a .csv file\n\n    Each row will represent a user uid, following by all the user's student\n    (if the user has any).  Note: the uid is not assumed to be an integer,\n    so it read in as a string, which shouldn't matter anyway.\n\n    TODO: we could probably speed this up by loading multiple lines at a time.\n\n    INPUT:\n        > filename: filename to read .csv from\n\n    RETURN:\n       > users: a set of User objects"
    users = dict()
    with open(filename, 'r') as file:
        for line in file:
            line = line.split('\n')[0]
            split_line = line.split(',')
            new_uid = _try_converting_to_int(split_line[0])
            new_user = User(new_uid)
            users.update({new_user.get_uid(): new_user})
    with open(filename, 'r') as file:
        for line in file:
            line = line.split('\n')[0]
            split_line = line.split(',')
            current_uid = _try_converting_to_int(split_line[0])
            for student_uid in split_line[1:]:
                student_uid = _try_converting_to_int(student_uid)
                users[current_uid].add_students(users[student_uid])
    return set(users.values())
Load users from a .csv file

Each row will represent a user uid, following by all the user's student
(if the user has any).  Note: the uid is not assumed to be an integer,
so it read in as a string, which shouldn't matter anyway.

TODO: we could probably speed this up by loading multiple lines at a time.

INPUT:
    > filename: filename to read .csv from

RETURN:
   > users: a set of User objects
def load_users(filename):
    "Load users from a .csv file\n\n    Each row will represent a user uid, following by all the user's student\n    (if the user has any).  Note: the uid is not assumed to be an integer,\n    so it read in as a string, which shouldn't matter anyway.\n\n    TODO: we could probably speed this up by loading multiple lines at a time.\n\n    INPUT:\n        > filename: filename to read .csv from\n\n    RETURN:\n       > users: a set of User objects"
    users = dict()
    with open(filename, 'r') as file:
        for line in file:
            line = line.split('\n')[0]
            split_line = line.split(',')
            new_uid = _try_converting_to_int(split_line[0])
            new_user = User(new_uid)
            users.update({new_user.get_uid(): new_user})
    with open(filename, 'r') as file:
        for line in file:
            line = line.split('\n')[0]
            split_line = line.split(',')
            current_uid = _try_converting_to_int(split_line[0])
            for student_uid in split_line[1:]:
                student_uid = _try_converting_to_int(student_uid)
                users[current_uid].add_students(users[student_uid])
    return set(users.values())