How is \Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider::searchResultToOutput() implemented?

Context: How are the rows data retrieved for the backend’s orders grid?