def __init__(
      self,
      clock_now: Callable[[], datetime.datetime],
      event_resolution_component_key: str = (
          switch_act.DEFAULT_RESOLUTION_COMPONENT_KEY),
      memory_component_key: str = (
          memory_component.DEFAULT_MEMORY_COMPONENT_KEY
      ),
      pre_event_fn: Callable[[PreEventFnArgsT], str] | None = None,
      post_event_fn: Callable[[PostEventFnArgsT], str] | None = None,
      pre_act_label: str = '',
      logging_channel: logging.LoggingChannel = logging.NoOpLoggingChannel,
      verbose: bool = False,
  ):
    """Initialize a component to call functions based on events.

    Args:
      clock_now: Function to call to get current time.
      event_resolution_component_key: The name of the event resolution
        component.
      memory_component_key: The name of the memory component.
      pre_event_fn: function to call with the action attempt before
        computing the event. It returns a string to log.
      post_event_fn: function to call with the event statement.
      pre_act_label: Prefix to add to the output of the component when called
        in `pre_act`.
      logging_channel: The channel to log debug information to.
      verbose: whether to print the full update chain of thought or not
    """
    self._pre_act_label = pre_act_label
    self._logging_channel = logging_channel
    self._verbose = verbose

    self._event_resolution_component_key = event_resolution_component_key
    self._memory_component_key = memory_component_key
    self._clock_now = clock_now

    self._pre_event_fn = pre_event_fn
    self._post_event_fn = post_event_fn

    self._latest_action_spec = None
Initialize a component to call functions based on events.

    Args:
      clock_now: Function to call to get current time.
      event_resolution_component_key: The name of the event resolution
        component.
      memory_component_key: The name of the memory component.
      pre_event_fn: function to call with the action attempt before
        computing the event. It returns a string to log.
      post_event_fn: function to call with the event statement.
      pre_act_label: Prefix to add to the output of the component when called
        in `pre_act`.
      logging_channel: The channel to log debug information to.
      verbose: whether to print the full update chain of thought or not
    
concordia/contrib/components/game_master/triggered_function.py