You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: format_two_dimensions.rb
    path of file: ./repos/reports_kit/lib/reports_kit/reports/data
    
    the code of the file until where you have to start completion: module ReportsKit
  module Reports
    module Data
      class FormatTwoDimensions
        attr_accessor :series, :dimension, :second_dimen
    
        def sorted_primary_keys
          @sorted_primary_keys ||= begin
            keys = sorted_primary_keys_secondary_keys_values.keys
            limit = dimension.dimension_instances_limit
            keys = keys.first(limit) if limit
            keys
          end