docs: def event_list_to_event_roll(source_event_list, event_label_list=None, time_resolution=0.01):
      """Convert event list into event roll, binary activity matrix
  
      Parameters
      ----------
      source_event_list : list, shape=(n,)
          A list containing event dicts
  
      event_label_list : list, shape=(k,) or None
          A list of containing unique labels in alphabetical order
          (Default value = None)
      time_resolution : float > 0
          Time resolution in seconds of the event roll
          (Default value = 0.01)
  
      Returns
      -------
  
      event_roll: np.ndarray, shape=(m,k)
          Event roll
  
      """
  
      if isinstance(source_event_list, dcase_util.containers.MetaDataContainer):
          max_offset_value = source_event_list.max_offset
  
          if event_label_list is None:
              event_label_list = source_event_list.unique_event_labels
  
      elif isinstance(source_event_list, list):
          max_offset_value = event_list.max_event_offset(source_event_list)
  
          if event_label_list is None:
              event_label_list = event_list.unique_event_labels(source_event_list)
  
      else:
          raise ValueError('Unknown source_event_list type.')
  
      # Initialize event roll
      event_roll = numpy.zeros((int(math.ceil(max_offset_value * 1 / time_resolution)), len(event_label_list)))
  
      # Fill-in event_roll
      for event in source_event_list:
          pos = event_label_list.index(event['event_label'])
  
          if 'event_onset' in event and 'event_offset' in event:
              event_onset = event['event_onset']
              event_offset = event['event_offset']
  
          elif 'onset' in event and 'offset' in event:
              event_onset = event['onset']
              event_offset = event['offset']
  
          onset = int(math.floor(event_onset * 1 / float(time_resolution)))
          offset = int(math.ceil(event_offset * 1 / float(time_resolution)))
  
          event_roll[onset:offset, pos] = 1
  
      return event_roll