```ruby
      partition_params = partition_keys.map { |key| params.fetch(key) }
      partition_params << partition_proc.call(params) if partition_proc.present?
```