code: def tag(self, text):
          
          if self.search_method == 'ahocorasick':
              events = self._find_events_ahocorasick(text.text)
          elif self.search_method == 'naive':
              events = self._find_events_naive(text.text)
  
          events = self._resolve_conflicts(events)
  
          self._event_intervals(events, text)
  
          if self.return_layer:
              return events
          else:
              text[self.layer_name] = events
docs: Retrieves list of events in the text.
          
          Parameters
          ----------
          text: Text
              The text to search for events.
              
          Returns
          -------
          list of events sorted by start, end