<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def finished(self):
 """ True if the job run and finished. There is no difference if the job finished successfully or errored. """


    return self.__state in (Job.ERROR, Job.SUCCESS, Job.CANCELLED)