def register_module(self, module, idx=-<NUM_LIT:1>):
if module in self._modules:<EOL><INDENT>raise AlreadyRegisteredError("<STR_LIT>".format(module))<EOL><DEDENT>if idx < <NUM_LIT:0>:<EOL><INDENT>self._modules.append(module)<EOL><DEDENT>else:<EOL><INDENT>self._modules.insert(idx, module)<EOL><DEDENT>
Register a module. You could indicate position inside inner list.

:param module: must be a string or a module object to register.
:type module: str
:param idx: position where you want to insert new module. By default it is inserted at the end.
:type idx: int