code: def convert_trigger(trigger: Optional[Union[str, "Trigger"]]):
      if trigger is None:
          return None
      if isinstance(trigger, str):
          if trigger.lower() == "everyepoch":
              return EveryEpoch().get_trigger()
          else:
              from bigdl.dllib.utils.log4Error import invalidInputError
  
              invalidInputError(
                  False,
                  "Only 'EveryEpoch', orca triggers and bigdl triggers are "
                  "supported now",
              )
      elif isinstance(trigger, Trigger):
          return trigger.get_trigger()
      else:
          return trigger
  
file_path: BigDL/python/orca/src/bigdl/orca/learn/trigger.py
imports: from abc import ABC, abstractmethod
  from typing import TYPE_CHECKING
  from typing import Union, Optional
label_desc: Use image node_id 2 for calling the Trigger obj's underlying member method code with example usage: obj.convert_trigger(trigger) and returns: None, EveryEpoch, trigger, trigger