def METHOD_NAME(self) -> User:
    user = User()
    user.program = self.program
    user.specialisations = self.specialisations[:]
    # prevent circular import; TODO: There has to be a better way
    from server.routers.courses import get_course
    for year in self.plan:
        for term in year:
            cleaned_term = {}
            for course_name, course_value in term.items():
                cleaned_term[course_name] = (
                    (course_value[0], course_value[1]) if course_value
                    else (get_course(course_name)["UOC"], None)
                )
            user.add_courses(cleaned_term)
    return user