def request_with_sets(opts, &block)
      sets = Array(opts.delete(:set))
      if opts[:skip_set]
        sets = self.sets(&:spec) if sets.empty?
        skips = Array(opts.delete(:skip_set))
        sets.reject! { |s| skips.include? s }
      end
      sets = [nil] if sets.empty?

      set_enums = sets.lazy.map do |set|
        set_opts = opts.dup
        set_opts[:set] = set unless set.nil?
        begin
          yield(set_opts) if block_given?
        rescue OAI::Exception => e
          Krikri::Logger.log :warn, "Skipping set #{set} with error: #{e}"
          []
        end
      end
      concat_enum(set_enums).lazy
    end
def request_with_sets(opts, &block)
      sets = Array(opts.delete(:set))
      if opts[:skip_set]
        sets = self.sets(&:spec) if sets.empty?
        skips = Array(opts.delete(:skip_set))
        sets.reject! { |s| skips.include? s }
      end
      sets = [nil] if sets.empty?

      set_enums = sets.lazy.map do |set|
        set_opts = opts.dup
        set_opts[:set] = set unless set.nil?
        begin
          yield(set_opts) if block_given?
        rescue OAI::Exception => e
          Krikri::Logger.log :warn, "Skipping set #{set} with error: #{e}"
          []
        end
      end
      concat_enum(set_enums).lazy
    end
Runs the request in the given block against the sets specified in `opts`.
 Results are concatenated into a single enumerator.

 Sets that respond with an error (`OAI::Exception`) will return empty
 and be skipped.

 @param opts [Hash] the options to pass, including all sets to process.
 @yield gives options to the block once for each set. The
   block should run the harvest action with the options and give an
   Enumerable.
 @yieldparam set_opts [Hash]
 @yieldreturn [Enumerable] a result set to wrap into the retured lazy
   enumerator

 @return [Enumerator::Lazy] A lazy enumerator concatenating the results
   of the block with each set.