def get_magicc6_to_magicc7_variable_mapping(inverse=False):
<EOL>magicc6_simple_mapping_vars = [<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>]<EOL>magicc6_sometimes_hyphen_vars = [<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>]<EOL>magicc6_sometimes_hyphen_vars = [<EOL>v.replace("<STR_LIT:->", "<STR_LIT>") for v in magicc6_sometimes_hyphen_vars<EOL>] + magicc6_sometimes_hyphen_vars<EOL>magicc6_sometimes_underscore_vars = [<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>]<EOL>magicc6_sometimes_underscore_replacements = {<EOL>v: v.replace("<STR_LIT:_>", "<STR_LIT>") for v in magicc6_sometimes_underscore_vars<EOL>}<EOL>special_case_replacements = {<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": "<STR_LIT>",  <EOL>}<EOL>one_way_replacements = {"<STR_LIT>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>"}<EOL>all_possible_magicc6_vars = (<EOL>magicc6_simple_mapping_vars<EOL>+ magicc6_sometimes_hyphen_vars<EOL>+ magicc6_sometimes_underscore_vars<EOL>+ list(special_case_replacements.keys())<EOL>+ list(one_way_replacements.keys())<EOL>)<EOL>replacements = {}<EOL>for m6v in all_possible_magicc6_vars:<EOL><INDENT>if m6v in special_case_replacements:<EOL><INDENT>replacements[m6v] = special_case_replacements[m6v]<EOL><DEDENT>elif (<EOL>m6v in magicc6_sometimes_underscore_vars and not inverse<EOL>):  <EOL><INDENT>replacements[m6v] = magicc6_sometimes_underscore_replacements[m6v]<EOL><DEDENT>elif (m6v in one_way_replacements) and not inverse:<EOL><INDENT>replacements[m6v] = one_way_replacements[m6v]<EOL><DEDENT>else:<EOL><INDENT>m7v = m6v.replace("<STR_LIT:->", "<STR_LIT>").replace("<STR_LIT:U+0020>", "<STR_LIT>").upper()<EOL>if (m7v in replacements.values()) and inverse:<EOL><INDENT>continue<EOL><DEDENT>replacements[m6v] = m7v<EOL><DEDENT><DEDENT>if inverse:<EOL><INDENT>return {v: k for k, v in replacements.items()}<EOL><DEDENT>else:<EOL><INDENT>return replacements<EOL><DEDENT>
Get the mappings from MAGICC6 to MAGICC7 variables.

    Note that this mapping is not one to one. For example, "HFC4310", "HFC43-10" and
    "HFC-43-10" in MAGICC6 both map to "HFC4310" in MAGICC7 but "HFC4310" in
    MAGICC7 maps back to "HFC4310".

    Note that HFC-245fa was mistakenly labelled as HFC-245ca in MAGICC6. In reality,
    they are not the same thing. However, the MAGICC6 labelling was merely a typo so
    the mapping between the two is one-to-one.

    Parameters
    ----------
    inverse : bool
        If True, return the inverse mappings i.e. MAGICC7 to MAGICC6 mappings

    Returns
    -------
    dict
        Dictionary of mappings