code: def call_workflow_event(instance, event, after=True):
      
      if not event.transition:
          return False
  
      portal_type = instance.portal_type
      wf_module = _load_wf_module('{}.events'.format(portal_type.lower()))
      if not wf_module:
          return False
  
      # Inspect if event_<transition_id> function exists in the module
      prefix = after and "after" or "before"
      func_name = "{}_{}".format(prefix, event.transition.id)
      func = getattr(wf_module, func_name, False)
      if not func:
          return False
  
      logger.info('WF event: {0}.events.{1}'
                  .format(portal_type.lower(), func_name))
      func(instance)
      return True
docs: Calls the instance's workflow event