def get_special_scen_code(regions, emissions):
if sorted(set(PART_OF_SCENFILE_WITH_EMISSIONS_CODE_0)) == sorted(set(emissions)):<EOL><INDENT>scenfile_emissions_code = <NUM_LIT:0><EOL><DEDENT>elif sorted(set(PART_OF_SCENFILE_WITH_EMISSIONS_CODE_1)) == sorted(set(emissions)):<EOL><INDENT>scenfile_emissions_code = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>msg = "<STR_LIT>".format(emissions)<EOL>raise ValueError(msg)<EOL><DEDENT>if set(regions) == set(["<STR_LIT>"]):<EOL><INDENT>scenfile_region_code = <NUM_LIT:1><EOL><DEDENT>elif set(regions) == set(["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]):<EOL><INDENT>scenfile_region_code = <NUM_LIT:2><EOL><DEDENT>elif set(regions) == set(["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]):<EOL><INDENT>scenfile_region_code = <NUM_LIT:3><EOL><DEDENT>elif set(regions) == set(<EOL>["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL>):<EOL><INDENT>scenfile_region_code = <NUM_LIT:4><EOL><DEDENT>try:<EOL><INDENT>return scenfile_region_code * <NUM_LIT:10> + scenfile_emissions_code<EOL><DEDENT>except NameError:<EOL><INDENT>msg = "<STR_LIT>".format(regions)<EOL>raise ValueError(msg)<EOL><DEDENT>
Get special code for MAGICC6 SCEN files.

At the top of every MAGICC6 and MAGICC5 SCEN file there is a two digit
number. The first digit, the 'scenfile_region_code' tells MAGICC how many regions
data is being provided for. The second digit, the 'scenfile_emissions_code', tells
MAGICC which gases are in the SCEN file.

The variables which are part of ``PART_OF_SCENFILE_WITH_EMISSIONS_CODE_1`` are the
emissions species which are expected when scenfile_emissions_code is 1. Similarly,
``PART_OF_SCENFILE_WITH_EMISSIONS_CODE_0`` defines the emissions species which are
expected when scenfile_emissions_code is 0.

Having these definitions allows Pymagicc to check that the right
set of emissions has been provided before writing SCEN files.

Parameters
----------
region : list_like
    Regions to get code for.
emissions : list-like
    Emissions to get code for.

Raises
------
ValueError
    If the special scen code cannot be determined.

Returns
-------
int
    The special scen code for the regions-emissions combination provided.