code: def from_str(s: Literal["min", "max"]) -> "Objective":
      if s == "min":
          return Min()
      else:
          return Max()
  
imports: from dataclasses import field
  from typing import Dict, Any, Optional
  from typing_extensions import Literal
  import numpy
  import mxnet
  from mxnet import gluon
  import mxnet.gluon.nn
  from gluonts.core.component import validated
  from gluonts.pydantic import dataclass
  from .callback import Callback
label_desc: Use image node_id 1 for calling the Objective obj's underlying member method code with example usage: obj.from_str(s) and returns: Min, Max