def _prepare_kind_section(inp, kind):
    """
    Insert a KIND section for a given 'StructureData.Kind'.
    Returns a reference to the newly created KIND section.
    """

    if "SUBSYS" not in inp["FORCE_EVAL"]:
        inp["FORCE_EVAL"]["SUBSYS"] = {}

    if "KIND" not in inp["FORCE_EVAL"]["SUBSYS"]:
        inp["FORCE_EVAL"]["SUBSYS"]["KIND"] = []

    inp["FORCE_EVAL"]["SUBSYS"]["KIND"].append({
        "_": kind.name,
        "ELEMENT": kind.symbol,
    })

    return inp["FORCE_EVAL"]["SUBSYS"]["KIND"][-1]