code: def log_func(n_classes, support_correct):
      """Calculate the logarithm in the support obtained by
      the base classifier.
  
      Parameters
      ----------
      n_classes : int
          The number of classes in the problem
  
      support_correct: array of shape (n_samples)
          Containing the supports obtained by the base classifier for the correct
          class
  
      Returns
      -------
      C_src : array of shape (n_samples)
              representing the classifier competences at each data point
  
      References
      ----------
      T.Woloszynski, M. Kurzynski, A measure of competence based on randomized
      reference classifier for dynamic ensemble selection, in: International
      Conference on Pattern Recognition (ICPR), 2010, pp. 4194–4197.
      """
  
      support_correct[support_correct > 1] = 1
      support_correct[support_correct < 0] = 0
  
      if n_classes == 2:
          C_src = (2 * support_correct) - 1
      else:
          temp = np.log(2) / np.log(n_classes)
          C_src = (2 * (support_correct**temp)) - 1
  
      return C_src
  
file_path: DESlib/deslib/util/prob_functions.py
imports: import numpy
  from scipy.special import betainc
  from scipy.stats import entropy
label_desc: Use image node_id 2 for calling a global function with example usage: log_func(n_classes, support_correct) and returns: C_src