def METHOD_NAME(self, category: Category = AnyCategory()):
    """ Given a user, returns the number of units they have taken for this uoc category """
    return sum(
        METHOD_NAME
        for course, (METHOD_NAME, _) in self.courses.items()
        if category.match_definition(course)
    )