<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pid(self):
 """The pid of the process associated to the scheduler."""

        try:
            return self._pid
        except AttributeError:
            self._pid = os.getpid()
            return self._pid