function getParent(structuredFields, fieldPath) {
  if (fieldPath.length === 1) {
    return structuredFields;
  }

  let pointer = structuredFields;

  for (let i = 0; i < fieldPath.length - 1; i++) {
    if (!has(pointer.children, fieldPath[i])) {
      throw assertionError.get("missing_parent", fieldPath.join("."));
    }

    pointer = pointer.children[fieldPath[i]];
  }

  return pointer;
}
@param {StructuredFieldSpecification} structuredFields
@param {string[]}fieldPath
@returns {StructuredFieldSpecification}