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: persist_configs.rb
    path of file: ./repos/motor-admin-rails/lib/motor/resources
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Motor
  module Resources
    module PersistConfigs
      COLUMN_DEFAULTS = B
    
      def assign_preferences!(resource, preferences)
        default_schema = fetch_default_schema(resource.name)

        resource.preferences = normalize_preferences(
          default_schema,
          resource.preferences,
          preferences
        )

        resource
      end