code: def _ReduceParserFilters(cls, includes, excludes):
      
      if not includes or not excludes:
        return
  
      for parser_name in set(includes).intersection(excludes):
        # Check parser and plugin list for exact equivalence.
        if includes[parser_name] == excludes[parser_name]:
          logger.warning(
              'Parser {0:s} was in both the inclusion and exclusion lists. '
              'Ignoring included parser.'.format(parser_name))
          includes.pop(parser_name)
          continue
  
        # Remove plugins that defined are in both inclusion and exclusion lists.
        plugin_includes = includes[parser_name]
        plugin_excludes = excludes[parser_name]
        intersection = set(plugin_includes).intersection(plugin_excludes)
        if not intersection:
          continue
  
        logger.warning(
            'Parser {0:s} plugins: {1:s} in both the inclusion and exclusion '
            'lists. Ignoring included plugins.'.format(
                parser_name, ', '.join(intersection)))
        plugins_list = list(set(plugin_includes).difference(intersection))
        includes[parser_name] = plugins_list
  
      # Remove excluded parsers that do not run.
      parsers_to_pop = []
      for parser_name in excludes:
        if parser_name in includes:
          continue
  
        logger.warning(
            'The excluded parser: {0:s} is not associated with the included '
            'parsers: {1:s}. Ignoring excluded parser.'.format(
                parser_name, ', '.join(includes.keys())))
        parsers_to_pop.append(parser_name)
  
      for parser_name in parsers_to_pop:
        excludes.pop(parser_name)
docs: Reduces the parsers and plugins to include and exclude.
  
      If an intersection is found, the parser or plugin is removed from
      the inclusion set. If a parser is not in inclusion set there is no need
      to have it in the exclusion set.
  
      Args:
        includes (dict[str, BaseParser]): included parsers and plugins by name.
        excludes (dict[str, BaseParser]): excluded parsers and plugins by name.