def _generate_preset_element(*, field):
    """Generate the JSON specification for a ``preset_options`` flavor of
    a ``select`` element.
    """
    option_elements = []
    for option in field["preset_options"]:
        option_elements.append(
            {"label": option["label"], "value": option["value"]}
        )
    element = {
        "label": field["label"],
        "type": "select",
        "name": field["label"],
        "options": option_elements,
        "optional": field["optional"],
    }
    return element