docs: def validate_onset(reference_event, estimated_event, t_collar=0.200):
          """Validate estimated event based on event onset
  
          Parameters
          ----------
          reference_event : dict
              Reference event.
  
          estimated_event: dict
              Estimated event.
  
          t_collar : float > 0, seconds
              Time collar with which the estimated onset has to be in order to be consider valid estimation.
              Default value 0.2
  
          Returns
          -------
          bool
  
          """
  
          # Detect field naming style used and validate onset
          if 'event_onset' in reference_event and 'event_onset' in estimated_event:
              return math.fabs(reference_event['event_onset'] - estimated_event['event_onset']) <= t_collar
  
          elif 'onset' in reference_event and 'onset' in estimated_event:
              return math.fabs(reference_event['onset'] - estimated_event['onset']) <= t_collar