@classmethod
def CheckFilterExpression(cls, parser_filter_expression):
    """Checks parser and plugin names in a parser filter expression.

    Args:
      parser_filter_expression (str): parser filter expression,
          where None represents all parsers and plugins.

          A parser filter expression is a comma separated value string that
          denotes which parsers and plugins should be used. See
          filters/parser_filter.py for details of the expression syntax.

          This function does not support presets, and requires a parser filter
          expression where presets have been expanded.

    Returns:
      tuple: containing:

      * set(str): parser filter expression elements that contain known parser
          and/or plugin names.
      * set(str): parser filter expression elements that contain unknown parser
          and/or plugin names.
    """
    if not parser_filter_expression:
        return set(cls._parser_classes.keys()), set()
    known_parser_elements = set()
    unknown_parser_elements = set()
    for element in parser_filter_expression.split(','):
        parser_expression = element
        if element.startswith('!'):
            parser_expression = element[1:]
        parser_name, _, plugin_name = parser_expression.partition('/')
        parser_class = cls._parser_classes.get(parser_name, None)
        if not parser_class:
            unknown_parser_elements.add(element)
            continue
        if not plugin_name:
            known_parser_elements.add(element)
            continue
        if parser_class.SupportsPlugins():
            plugins = dict(parser_class.GetPlugins())
            if plugin_name in plugins:
                known_parser_elements.add(element)
            else:
                unknown_parser_elements.add(element)
    return known_parser_elements, unknown_parser_elements
