def gen_var_info(var_names: list,
                 zip_var_name: str = "uZipVars",
                 offset_name: str = "offset",
                 enum_name: str = "VAR",
                 enum_prefix: str = "U",
                 use_const: bool = True,
                 enum_start_idx: int = 0,
                 enum_var_names: list = [],
                 dtype: str = "double",
                 num_spaces: int = 0):
    """Generates the allocation variables in physcon.cpp

    If enum_var_names is empty, then it'll just use "upper"
    on the var names input. Other wise, the list should match
    one-to-one with the incoming variable names.
    """

    if enum_var_names:
        assert len(var_names) == len(
            enum_var_names), "The input list sizes do not match"

    physcon_text = ""

    for ii, var_name in enumerate(var_names):
        if enum_var_names:
            enum_entry = enum_var_names[ii]
            enum_prefix_use = ""
        else:
            enum_entry = var_name.upper()
            enum_prefix_use = f"{enum_prefix}_"

        phys_con_line = "".join(" " for i in range(num_spaces))
        # NOTE: before I had it without the ` const `
        phys_con_line += f"{'const ' if use_const else ''}{dtype} * const "
        phys_con_line += f"{var_name} = &"
        phys_con_line += f"{zip_var_name}["
        phys_con_line += f"{enum_name}::{enum_prefix_use}{enum_entry}"
        phys_con_line += f"][{offset_name}];\n"

        physcon_text += phys_con_line

    return physcon_text