def METHOD_NAME(task_el, course, year):
    title = task_el.getElementsByTagName('th')[0].firstChild.data.rsplit('[', 1)[0]
    weight = task_el.getAttribute('n')
    print title
    text = "\n".join(get_task_lines(task_el))
    parent_task, _ = Task.objects.get_or_create(title=title, course=course, task_text=text)
    parent_task.weight = weight
    parent_task.save()
    for subtask_el in task_el.getElementsByTagName('tm')[0].getElementsByTagName('t'):
        title = subtask_el.getAttribute('h').rsplit('[', 1)[0]
        weight = subtask_el.getAttribute('m')
        print ">>" + title
        max_score = subtask_el.getAttribute('b')
        subtask_obj, _ = Task.objects.get_or_create(title=title, course=course, score_max=max_score,
                                                    parent_task=parent_task)
        subtask_obj.weight = weight
        subtask_obj.save()
        try:
            import_tasktakens(subtask_obj, subtask_el, year)
        except IndexError:  # no task takens
            pass