def read_with_retry_cursor(session, server_selector, view, &block)
      read_with_retry(session, server_selector) do |server|
        result = yield server
        Cursor.new(view, result, server, session: session)
      end
    end
def read_with_retry_cursor(session, server_selector, view, &block)
      read_with_retry(session, server_selector) do |server|
        result = yield server
        Cursor.new(view, result, server, session: session)
      end
    end
Execute a read operation returning a cursor with retrying.

 This method performs server selection for the specified server selector
 and yields to the provided block, which should execute the initial
 query operation and return its result. The block will be passed the
 server selected for the operation. If the block raises an exception,
 and this exception corresponds to a read retryable error, and read
 retries are enabled for the client, this method will perform server
 selection again and yield to the block again (with potentially a
 different server). If the block returns successfully, the result
 of the block (which should be a Mongo::Operation::Result) is used to
 construct a Mongo::Cursor object for the result set. The cursor
 is then returned.

 If modern retry reads are on (which is the default), the initial read
 operation will be retried once. If legacy retry reads are on, the
 initial read operation will be retried zero or more times depending
 on the :max_read_retries client setting, the default for which is 1.
 To disable read retries, turn off modern read retries by setting
 retry_reads: false and set :max_read_retries to 0 on the client.

 @api private

 @example Execute a read returning a cursor.
   cursor = read_with_retry_cursor(session, server_selector, view) do |server|
     # return a Mongo::Operation::Result
     ...
   end

 @param [ Mongo::Session ] session The session that the operation is being
   run on.
 @param [ Mongo::ServerSelector::Selectable ] server_selector Server
   selector for the operation.
 @param [ CollectionView ] view The +CollectionView+ defining the query.
 @param [ Proc ] block The block to execute.

 @return [ Cursor ] The cursor for the result set.