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: form_builder.rb
    path of file: ./repos/sequencescape/app/models/metadata
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
class Metadata::FormBuilder < Metadata::BuilderBase
  def initialize(*args, &block)
    super
    view_for(:field, 'shared/metadata/edit_field')
    view_for(:radio_field, 'shared/metadata/radio_field')
    view_for(:header, 'shared/metadata/header')
    view_for(:document, 'shared/metadata/edit_document_field')

    @related_fields, @changing = [], []
  end

  # Creates a file upload field that will be properly handled by Document instances.  It's a bit of
  # a hack because the field we're actually rendering is not what is requested in 'field', but
  # 'field_attributes[uploaded_data]', so we have to also use a speci
    
  def radio_select(method, choices, options = {}, html_options = {}) # rubocop:todo Metrics/MethodLength
    group = html_options.delete(:grouping) || options.delete(:grouping)
    property_field(:radio_field, method, grouping: group) do
      choices.each_with_object(+''.html_safe) do |(label_text, option_value), output|
        output <<
          tag.div(class: %w[custom-control custom-radio custom-control-inline]) do
            value = option_value || label_text
            concat radio_button(method, value, class: 'custom-control-input', required: true)
            concat label(method, label_text, class: 'custom-control-label', value: value)
          end
      end
    end
  end