def _load_language_or_die(f):
<EOL>@wraps(f)<EOL>def loader(language, word, *args, **kwargs):<EOL><INDENT>method = f.func_name<EOL>try:<EOL><INDENT>if isinstance(language, (list, tuple)):<EOL><INDENT>_lltk = __import__('<STR_LIT>' + language[<NUM_LIT:0>], globals(), locals(), [method], -<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>_lltk = __import__('<STR_LIT>' + language, globals(), locals(), [method], -<NUM_LIT:1>)<EOL><DEDENT><DEDENT>except ImportError:<EOL><INDENT>from lltk.exceptions import LanguageNotSupported<EOL>raise LanguageNotSupported('<STR_LIT>' + language + '<STR_LIT>')<EOL><DEDENT>if hasattr(_lltk, method):<EOL><INDENT>function = getattr(_lltk, method)<EOL>if callable(function):<EOL><INDENT>return function(word, *args, **kwargs)<EOL><DEDENT><DEDENT>raise NotImplementedError('<STR_LIT>' + language + '<STR_LIT:.>' + method +'<STR_LIT>')<EOL><DEDENT>return loader<EOL>
Decorator used to load a custom method for a given language.