code: def get_beta(gradk, gradk_1, cgradk_1):
      """compute the coefficient beta required to update CG direction"""
      _batch_size = gradk.shape[0]
      _cgradk_1 = cgradk_1.reshape(_batch_size, -1)
      _gradk = -gradk.reshape(_batch_size, -1)
      _gradk_1 = -gradk_1.reshape(_batch_size, -1)
      delta_gradk = _gradk - _gradk_1
      betak = -(_gradk * delta_gradk).sum(axis=1) / (
          (_cgradk_1 * delta_gradk).sum(axis=1)
          + np.finfo(ART_NUMPY_DTYPE).eps
      )
      return betak.reshape(
          (_batch_size,) + (1,) * (len(gradk.shape) - 1)
      )
  
file_path: adversarial-robustness-toolbox/art/attacks/evasion/auto_conjugate_gradient.py
imports: import abc
  import logging
  import math
  from typing import Optional, Union, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.config import ART_NUMPY_DTYPE
  from art.attacks.attack import EvasionAttack
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from art.utils import check_and_transform_label_format, projection, random_sphere, is_probability, get_labels_np_array
label_desc: Use image node_id 1 for calling a global function with example usage: get_beta(gradk, gradk_1, cgradk_1) and returns: betak