protected function extractConfigurableOptions($attribute_set, array $configurable_options) {
    /** @var \Drupal\acm_sku\CartFormHelper $helper */
    $helper = \Drupal::service('acm_sku.cart_form_helper');

    // Load existing options.
    $existing_options = $helper->getConfigurableAttributeWeights($attribute_set);

    // Transform incoming options.
    foreach ($configurable_options as $configurable) {
      $existing_options[$configurable['code']] = $configurable['position'];
    }

    // Save options.
    $helper->setConfigurableAttributeWeights($attribute_set, $existing_options);
  }