def collection(options = {}, &block)
      @collection ||=
        ModuleUtils.yield_for(
          begin
            options[:paginate] = true unless options.key?(:paginate)
            options[:params] ||= params
            paginate current_servicer.collection(options.delete(:params)), options
          end,
          &block
        )
    end
def collection(options = {}, &block)
      @collection ||=
        ModuleUtils.yield_for(
          begin
            options[:paginate] = true unless options.key?(:paginate)
            options[:params] ||= params
            paginate current_servicer.collection(options.delete(:params)), options
          end,
          &block
        )
    end
@note This is a template method that can be overridden by subclasses.
 This is a method to return collection for index page.

 It can be customized as below in subclasses:

 ```
 def collection
   # do something before the origin action
   options = {} # NOTE: see `options` parameter for more details
   collection! options do |query| # NOTE: this is better than using `super`
     # NOTE: make sure a collection is returned
     query.where(active: true)
   end
 end
 ```

 Otherwise, it can be replaced completely in subclasses:

 ```
 def collection
   # NOTE: pagination should happen here if needed
   # NOTE: make sure `@collection` and conditional assignment (the OR EQUAL) operator are used
   @collection ||= paginate Product.active
 end
 ```
 @param options [Hash] (since 5.2.0)
 @option options [ActionController::Parameters, Hash] :params parameters for collection query
 @option options [Boolean] :paginate see {Wallaby::Paginatable#paginate}
 @yield [collection] (since 5.2.0) a block to run to extend collection, e.g. call chain with more queries
 @return [#each] a collection of records