def build_row_contexts
      rows = @data.size
      row_contexts = [:default] * rows
      offset = 0
      @contexts.each do |ctx|
        if ctx == :default
          break
        end
        size = ctx[:rows]
        row_contexts[offset...(size + offset)] = [ctx[:id]] * size
        offset += size
      end
      @contexts.reverse_each do |ctx|
        if ctx == :default
          break
        end
        size = ctx[:rows]
        row_contexts[(rows - size)...rows] = [ctx[:id]] * size
        rows -= size
      end
      row_contexts
    end
def build_row_contexts
      rows = @data.size
      row_contexts = [:default] * rows
      offset = 0
      @contexts.each do |ctx|
        if ctx == :default
          break
        end
        size = ctx[:rows]
        row_contexts[offset...(size + offset)] = [ctx[:id]] * size
        offset += size
      end
      @contexts.reverse_each do |ctx|
        if ctx == :default
          break
        end
        size = ctx[:rows]
        row_contexts[(rows - size)...rows] = [ctx[:id]] * size
        rows -= size
      end
      row_contexts
    end
maps the context for each row