class_docstr: Class for explanation aggregator. It aggregates the explanations based on classes, feature and scores.
docstr: Get feature names for an explanation, plus schema validation
  Args:
      list_explanations (list): List of explanations
  
  Returns:
      (set) feature names
code: def get_feature_names(self, list_explanations: List[Dict]) -> Set:
      """
      Get feature names for an explanation, plus schema validation
      Args:
          list_explanations (list): List of explanations
  
      Returns:
          (set) feature names
      """
      feature_names = set()
      for item in list_explanations:
          if type(item) != dict:
              raise InvalidExplanationFormat(item)
          if OUTPUT.FEATURE not in item.keys():
              raise InvalidExplanationFormat(item)
          if type(item[OUTPUT.FEATURE]) != str:
              raise InvalidExplanationFormat(item)
          if item[OUTPUT.FEATURE] in feature_names:
              raise MutipleScoresFoundForSameFeature(
                  item[OUTPUT.FEATURE], list_explanations
              )
          else:
              feature_names.add(item[OUTPUT.FEATURE])
          if OUTPUT.SCORE not in item.keys():
              raise InvalidExplanationFormat(item)
          if type(item[OUTPUT.SCORE]) != float:
              raise InvalidExplanationFormat(item)
  
      return feature_names
  
file_path: contextual-ai/xai/model/interpreter/explanation_aggregator.py
imports: import operator
  from collections import defaultdict, Counter
  from typing import Dict, Tuple, List, Set
  from xai.explainer.constants import OUTPUT
  from xai.model.interpreter.exceptions import InvalidExplanationFormat, MutipleScoresFoundForSameFeature, UnsupportedMethodType, InvalidArgumentError
label_desc: Use image node_id 2 for calling the ExplanationAggregator obj's underlying member method code with example usage: obj.get_feature_names(list_explanations) and returns: feature_names