code: def compute_success(
      classifier: "CLASSIFIER_TYPE",
      x_clean: np.ndarray,
      labels: np.ndarray,
      x_adv: np.ndarray,
      targeted: bool = False,
      batch_size: int = 1,
  ) -> float:
      """
      Compute the success rate of an attack based on clean samples, adversarial samples and targets or correct labels.
  
      :param classifier: Classifier used for prediction.
      :param x_clean: Original clean samples.
      :param labels: Correct labels of `x_clean` if the attack is untargeted, or target labels of the attack otherwise.
      :param x_adv: Adversarial samples to be evaluated.
      :param targeted: `True` if the attack is targeted. In that case, `labels` are treated as target classes instead of
             correct labels of the clean samples.
      :param batch_size: Batch size.
      :return: Percentage of successful adversarial samples.
      """
      attack_success = compute_success_array(
          classifier, x_clean, labels, x_adv, targeted, batch_size
      )
      return np.sum(attack_success) / x_adv.shape[0]
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import math
  import os
  import shutil
  import sys
  import tarfile
  import warnings
  import zipfile
  from functools import wraps
  from inspect import signature
  from typing import TYPE_CHECKING, Callable, List, Dict, Optional, Tuple, Union
  import numpy
  import six
  from scipy.special import gammainc
  from tqdm.auto import tqdm
  from art import config
label_desc: Use image node_id 23 for calling a global function with example usage: compute_success(classifier, x_clean, labels, x_adv, targeted, batch_size) and returns: unknown