public static function addressAjaxCallback(array $form, FormStateInterface $form_state, Request $request) {
    $form_parents = explode('/', $request->query->get('element_parents'));

    // Retrieve the element to be rendered.
    $form = NestedArray::getValue($form, $form_parents);

    $values = $form_state->getValue($form['#parents']);
    $country = $values['country_id'];

    $dynamic_parts = self::calculateDynamicParts($country);
    return array_replace_recursive($form['dynamic_parts'], $dynamic_parts);
  }