public function do($onNextOrObserver = null, callable $onError = null, callable $onCompleted = null): Observable
    {
        if ($onNextOrObserver instanceof ObserverInterface) {
            $observer = $onNextOrObserver;
        } elseif (is_callable($onNextOrObserver)) {
            $observer = new DoObserver($onNextOrObserver, $onError, $onCompleted);
        } else {
            throw new \InvalidArgumentException('The first argument needs to be a "callable" or "Observer"');
        }

        return $this->lift(function () use ($observer) {
            return new DoOnEachOperator($observer);
        });
    }