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: calculated_adjustments.rb
    path of file: ./repos/openfoodnetwork/app/models/concerns
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require "active_support/concern"

module CalculatedAdjustments
  extend ActiveSupport::Concern

  included do
    has_one :calculator, as: :calculable, class_name: "Spree::Calculator", dependent: :destroy
    accepts_nested_attributes_for :calculator
    validates :calculator, presence: true
  end

  class_m
    
  def create_adjustment(label, adjustable, mandatory = false, state = "closed", tax_category = nil)
    amount = compute_amount(adjustable)
    return if amount.zero? && !mandatory

    adjustment_attributes = {
      amount:,
      originator: self,
      order: order_object_for(adjustable),
      label:,
      mandatory:,
      state:,
      tax_category:
    }

    if adjustable.respond_to?(:adjustments)
      adjustable.adjustments.create(adjustment_attributes)
    else
      adjustable.create_adjustment(adjustment_attributes)
    end