def get_format_modules(lang=None, reverse=False):
if lang is None:<EOL><INDENT>lang = get_language()<EOL><DEDENT>modules = _format_modules_cache.setdefault(lang, list(<EOL>iter_format_modules(lang)))<EOL>if reverse:<EOL><INDENT>return list(reversed(modules))<EOL><DEDENT>return modules<EOL>
Returns a list of the format modules found