code: def auc(curve):
      """Computes the area under the specified curve.
  
      :param curve: a curve, specified as a list of (x, y) tuples
      :type curve: [(x, y), ...]
  
      .. seealso:: :func:`optunity.score_functions.compute_curve`
  
      """
      area = 0.0
      for i in range(len(curve) - 1):
          x1, y1 = curve[i]
          x2, y2 = curve[i + 1]
          if y1 is None:
              y1 = 0.0
          area += (
              float(min(y1, y2)) * float(x2 - x1)
              + math.fabs(float(y2 - y1)) * float(x2 - x1) / 2
          )
  
      return area
  
imports: import math
  import operator
label_desc: Use image node_id 3 for calling a global function with example usage: auc(curve) and returns: area