class_docstr: Type of AUC Curve (ROC or PR).
class_docstr_tok: ["Type","of","AUC","Curve","(","ROC","or","PR",")","."]
code: def from_str(key):
      if key in ("pr", "PR"):
          return AUCCurve.PR
      elif key in ("roc", "ROC"):
          return AUCCurve.ROC
      else:
          raise ValueError(
              f'Invalid AUC curve value: "{key}". '
              'Expected values are ["PR", "ROC"]'
          )
  
imports: from enum import Enum
  import numpy
  from keras import backend
  from keras import ops
  from keras.losses.loss import squeeze_to_same_rank
  from keras.utils.python_utils import to_list
label_desc: Use image node_id 1 for calling the AUCCurve obj's underlying member method code with example usage: obj.from_str(key) and returns: AUCCurve, AUCCurve