code: def attack_success_rate_perc(self):
      if self.successful_attacks + self.failed_attacks == 0:
          attack_success_rate = 0
      else:
          attack_success_rate = (
              self.successful_attacks
              * 100.0
              / (self.successful_attacks + self.failed_attacks)
          )
      attack_success_rate = round(attack_success_rate, 2)
      return attack_success_rate
  
file_path: TextAttack/textattack/metrics/attack_metrics/attack_success_rate.py
imports: from textattack.attack_results import FailedAttackResult, SkippedAttackResult
  from textattack.metrics import Metric
label_desc: Use image node_id 5 for calling the AttackSuccessRate obj's underlying member method code with example usage: obj.attack_success_rate_perc() and returns: attack_success_rate