def load_modes(self, input_modes=None):
<EOL>_modes = [<EOL>GameMode(<EOL>mode="<STR_LIT>", priority=<NUM_LIT:2>, digits=<NUM_LIT:4>, digit_type=DigitWord.DIGIT, guesses_allowed=<NUM_LIT:10><EOL>),<EOL>GameMode(<EOL>mode="<STR_LIT>", priority=<NUM_LIT:1>, digits=<NUM_LIT:3>, digit_type=DigitWord.DIGIT, guesses_allowed=<NUM_LIT:6><EOL>),<EOL>GameMode(<EOL>mode="<STR_LIT>", priority=<NUM_LIT:3>, digits=<NUM_LIT:6>, digit_type=DigitWord.DIGIT, guesses_allowed=<NUM_LIT:6><EOL>),<EOL>GameMode(<EOL>mode="<STR_LIT>", priority=<NUM_LIT:4>, digits=<NUM_LIT:4>, digit_type=DigitWord.HEXDIGIT, guesses_allowed=<NUM_LIT:10><EOL>)<EOL>]<EOL>if input_modes is not None:<EOL><INDENT>if not isinstance(input_modes, list):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>for mode in input_modes:<EOL><INDENT>if not isinstance(mode, GameMode):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>_modes.append(mode)<EOL><DEDENT><DEDENT>self._game_modes = copy.deepcopy(_modes)<EOL>
Loads modes (GameMode objects) to be supported by the game object. Four default
modes are provided (normal, easy, hard, and hex) but others could be provided
either by calling load_modes directly or passing a list of GameMode objects to
the instantiation call.

:param input_modes: A list of GameMode objects; nb: even if only one new GameMode
object is provided, it MUST be passed as a list - for example, passing GameMode gm1
would require passing [gm1] NOT gm1.

:return: A list of GameMode objects (both defaults and any added).