<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _ps_extract_pid(self, line):
 """ Extract PID and parent PID from an output line from the PS command """

        this_pid = self.regex['pid'].sub(r'\g<1>', line)
        this_parent = self.regex['parent'].sub(r'\g<1>', line)
        
        # Return the main / parent PIDs
        return this_pid, this_parent