def METHOD_NAME(self, timeout=None):
    if self.returncode is None:
        if timeout is not None:
            if not METHOD_NAME([self.sentinel], timeout):
                return None
        # This shouldn't block if wait() returned successfully.
        return self.poll(os.WNOHANG if timeout == 0.0 else 0)
    return self.returncode