def filter_name(funcname, package, context="<STR_LIT>", explicit=False):
packfilter = _get_name_filter(package, context)<EOL>if packfilter is None:<EOL><INDENT>return True<EOL><DEDENT>matched = None<EOL>if packfilter["<STR_LIT>"] is not None:<EOL><INDENT>from fnmatch import fnmatch<EOL>for pattern in packfilter["<STR_LIT>"]:<EOL><INDENT>if fnmatch(funcname, pattern):<EOL><INDENT>matched = True<EOL>return matched<EOL><DEDENT><DEDENT><DEDENT>if packfilter["<STR_LIT>"] is not None: <EOL><INDENT>for pattern in packfilter["<STR_LIT>"]:<EOL><INDENT>if pattern.match(funcname):<EOL><INDENT>matched = True<EOL>return matched<EOL><DEDENT><DEDENT><DEDENT>if packfilter["<STR_LIT>"] is not None:<EOL><INDENT>from fnmatch import fnmatch<EOL>for pattern in packfilter["<STR_LIT>"]:<EOL><INDENT>if fnmatch(funcname, pattern):<EOL><INDENT>matched = False<EOL>return matched<EOL><DEDENT><DEDENT><DEDENT>if packfilter["<STR_LIT>"] is not None: <EOL><INDENT>for pattern in packfilter["<STR_LIT>"]:<EOL><INDENT>if pattern.match(funcname):<EOL><INDENT>matched = False<EOL>return matched<EOL><DEDENT><DEDENT><DEDENT>if matched is None:<EOL><INDENT>matched = not explicit<EOL><DEDENT>return matched<EOL>
Returns True if the specified function should be filtered (i.e., included
    or excluded for use in the specified context.)

    Args: 
        funcname (str): name of the method/function being called.
        package (str): name of the package that the method belongs to.
        context (str): one of ['decorate', 'time', 'analyze']; specifies which
          section of the configuration settings to check.
        explicit (bool): when True, if a name is not explicitly specified for
          inclusion, then the function returns False.

    Returns:
        bool: specifying whether the function should be decorated, timed or
          analyzed.