class_docstr: Represents the result of a classification goal function.
class_docstr_tok: ["Represents","the","result","of","a","classification","goal","function","."]
docstr: Returns a string representation of this result's output, colored
  according to `color_method`.
docstr_tok: ["Returns","a","string","representation","of","this","result","'s","output",",","colored","according","to","`","color_method","`","."]
code: def get_colored_output(self, color_method=None):
      """Returns a string representation of this result's output, colored
      according to `color_method`."""
      output_label = self.raw_output.argmax()
      confidence_score = self.raw_output[output_label]
      if isinstance(confidence_score, torch.Tensor):
          confidence_score = confidence_score.item()
      output, color = self._processed_output
      # concatenate with label and convert confidence score to percent, like '33%'
      output_str = f"{output} ({confidence_score:.0%})"
      return utils.color_text(
          output_str, color=color, method=color_method
      )
  
file_path: TextAttack/textattack/goal_function_results/classification_goal_function_result.py
imports: import torch
  import textattack
  from textattack.shared import utils
  from .goal_function_result import GoalFunctionResult
label_desc: Use image node_id 5 for calling the ClassificationGoalFunctionResult obj's underlying member method code with example usage: obj.get_colored_output(color_method) and returns: utils