<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ncores_used(self):
 """ Returns the number of cores used in this moment. A core is used if there's a job that is running on it. """

        return sum(task.manager.num_cores for task in self if task.status == task.S_RUN)