def METHOD_NAME(task_el, course, year):
    max_score = task_el.getAttribute('b')
    title = task_el.getElementsByTagName('th')[0].firstChild.data.rsplit('[', 1)[0].strip()
    weight = task_el.getAttribute('n')
    print title
    text = "\n".join(get_task_lines(task_el))
    task_obj, _ = Task.objects.get_or_create(title=title, course=course, task_text=text, score_max=max_score)
    task_obj.weight = weight
    task_obj.save()
    try:
        import_tasktakens(task_obj, task_el.getElementsByTagName('ts')[0], year)
    except IndexError:  # no task takens
        pass