public function filterBySubscribedStatus($collection, $emailColumn = 'customer_email')
    {
        $originalCollection = clone $collection;
        $emails = $originalCollection->getColumnValues($emailColumn);

        if (! empty($emails)) {
            $subscriberCollectionFactory = $this->subscriberCollectionFactory->create();
            $onlySubscribedEmails = $subscriberCollectionFactory->addFieldToFilter(
                'subscriber_email',
                ['in' => $emails]
            )
                ->addFieldToFilter('subscriber_status', \Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED)
                ->getColumnValues('subscriber_email');

            $collection->addFieldToFilter($emailColumn, ['in' => $onlySubscribedEmails]);
        }

        return $collection;
    }