def make_dict(
    nn,
    q_id,
    polarity,
    context_cond,
    cat,
    subcat,
    answer_info,
    bias_targets,
    version,
    notes,
    context,
    question,
    ans_list,
    ans_place,
):
    """
    Formats information into a standardized dict that can be saved to jsonl

    Args:
        nn: item number created for output
        q_id: item number from the template file
        polarity: neg/nonneg indicating what type of question is used
        context_cond: ambig/disambig indicating the type of context used
        cat: category of bias
        subcat: subcategory of bias, if defined
        answer_info: information about the answer items, provided as a list of three lists
        bias_targets: list of bias targets for that template
        version: version info from the template file
        notes: additional info provided in the template file
        context: string, full context provided for model input
        question: string, question provided for model input
        ans_list: list of answer options
        ans_place: label corresponding to which answer option is correct

    Returns:
        dictionary
    """
    this_dict = {
        "example_id": nn,
        "question_index": q_id,
        "question_polarity": polarity,
        "context_condition": context_cond,
        "category": cat,
        "answer_info": answer_info,
        "additional_metadata": {
            "subcategory": subcat,
            "stereotyped_groups": bias_targets,
            "version": version,
            "source": notes,
        },
        "context": context.strip(),
        "question": question.strip(),
        "ans0": ans_list[0],
        "ans1": ans_list[1],
        "ans2": ans_list[2],
        "label": ans_place,
    }
    return this_dict