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: field_selection.rb
    path of file: ./repos/gitlabhq/spec/support/helpers/graphql
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Graphql
  class FieldSelection
    delegate :empty?, :blank?, :to_h, to: :selection
    delegate :size, to: :paths

    attr_reader :selection

    def i
    
    def serialize_field_selection(hash, level = 0)
      indent = ' ' * level

      hash.map do |field, subselection|
        if subselection.nil?
          "#{indent}#{field}"
        else
          subfields = serialize_field_selection(subselection, level + 1)
          "#{indent}#{field} {\n#{subfields}\n#{indent}}"
        end
      end.join("\n")
    end