'Register codeintel/lang modules.
@param extra_module_dirs {sequence} is an optional list of extra
dirs in which to look for and use "codeintel|lang_*.py"
support modules. By default just the codeintel2 package
directory is used.'

def _register_modules(self, extra_module_dirs=None):

    dirs = [dirname(__file__)]
    if extra_module_dirs:
        dirs += extra_module_dirs
    import_hook = self._ImportHook(self._registered_module_canon_paths.union(dirs))
    sys.meta_path.append(import_hook)
    try:
        for dir in dirs:
            for module_path in glob(join(dir, 'codeintel_*.py')):
                self._register_module(module_path)
            for module_path in glob(join(dir, 'lang_*.py')):
                warnings.warn(("%s:    `lang_*.py'    codeintel    modules    are    deprecated,    use    `codeintel_*.py'.    Support    for    `lang_*.py'    will    be    dropped    in    Komodo    5.1." % module_path), CodeIntelDeprecationWarning)
                self._register_module(module_path)
    finally:
        sys.meta_path.remove(import_hook)
