def _get_name_filter(package, context="<STR_LIT>", reparse=False):
global name_filters<EOL>pkey = (package, context)<EOL>if pkey in name_filters and not reparse:<EOL><INDENT>return name_filters[pkey]<EOL><DEDENT>from acorn.config import settings<EOL>spack = settings(package)<EOL>sections = {<EOL>"<STR_LIT>": ["<STR_LIT>", "<STR_LIT>"],<EOL>"<STR_LIT:time>": ["<STR_LIT>", "<STR_LIT>"],<EOL>"<STR_LIT>": ["<STR_LIT>", "<STR_LIT>"]<EOL>}<EOL>filters, rfilters = None, None<EOL>import re<EOL>if context in sections:<EOL><INDENT>filters, rfilters = [], []<EOL>ignores, rignores = [], []<EOL>for section in sections[context]:<EOL><INDENT>if spack.has_section(section):<EOL><INDENT>options = spack.options(section)<EOL>if "<STR_LIT>" in options:<EOL><INDENT>filters.extend(re.split(r"<STR_LIT>", spack.get(section, "<STR_LIT>")))<EOL><DEDENT>if "<STR_LIT>" in options: <EOL><INDENT>pfilters = re.split(r"<STR_LIT>", spack.get(section, "<STR_LIT>"))<EOL>rfilters.extend([re.compile(p, re.I) for p in pfilters])<EOL><DEDENT>if "<STR_LIT:ignore>" in options:<EOL><INDENT>ignores.extend(re.split(r"<STR_LIT>", spack.get(section, "<STR_LIT:ignore>")))<EOL><DEDENT>if "<STR_LIT>" in options: <EOL><INDENT>pignores = re.split(r"<STR_LIT>", spack.get(section, "<STR_LIT>"))<EOL>rignores.extend([re.compile(p, re.I) for p in pfilters])<EOL><DEDENT><DEDENT><DEDENT>name_filters[pkey] = {<EOL>"<STR_LIT>": filters,<EOL>"<STR_LIT>": rfilters,<EOL>"<STR_LIT>": ignores,<EOL>"<STR_LIT>": rignores<EOL>}<EOL><DEDENT>else:<EOL><INDENT>name_filters[pkey] = None<EOL><DEDENT>return name_filters[pkey]<EOL>
Makes sure that the name filters for the specified package have been
    loaded.

    Args:
        package (str): name of the package that this method belongs to.
        context (str): one of ['decorate', 'time', 'analyze']; specifies which
          section of the configuration settings to check.