def last_process_created(self, prev_pids, new_pids): pids = [] for p in new_pids: if p not in prev_pids: pids.append(p) return pids