code: def plot_curve_with_area(
      x: Iterable[float],
      y: Iterable[float],
      xlabel: Text = "x",
      ylabel: Text = "y",
  ) -> plt.Figure:
      """Plot the curve defined by inputs and the area under the curve.
  
      All entries of x and y are required to lie between 0 and 1.
      For example, x could be recall and y precision, or x is fpr and y is tpr.
  
      Args:
        x: Values on x-axis (1d)
        y: Values on y-axis (must be same length as x)
        xlabel: Label for x axis
        ylabel: Label for y axis
  
      Returns:
        The matplotlib figure handle
      """
      fig = plt.figure()
      plt.plot([0, 1], [0, 1], "k", lw=1.0)
      plt.plot(x, y, lw=2, label=f"AUC: {metrics.auc(x, y):.3f}")
      plt.xlabel(xlabel)
      plt.ylabel(ylabel)
      plt.gca().set_aspect("equal", adjustable="box")
      plt.legend()
      return fig
  
imports: from typing import Text, Iterable, Optional
  import matplotlib.pyplot
  import numpy
  from sklearn import metrics
label_desc: Use image node_id 2 for calling a global function with example usage: plot_curve_with_area(x, y, xlabel, ylabel) and returns: fig