docs: def set_event_data(self, data, read_attrs):
          """ Set event data with the specied attributes.
          
          :param data: Event data table.
          :param read_attrs: Attributes to put on the read group. This must include
              the read_number, which must refer to a read present in the object. The
              attributes should not include the standard read attributes:
  
               * read_id
               * start_time
               * duration
               * start_mux
  
              Those will be pulled from the read information already present in the
              object for the specified read.
          """
          if self.handle.mode == 'r':
              raise Exception('File is not open for writing.')
          read_number = read_attrs['read_number']
          read_group = '{}/Reads/Read_{}'.format(self.group_name, read_number)
          read_info = self.handle.status.read_info
          read_number_map = self.handle.status.read_number_map
          index = read_number_map.get(read_number)
          if index is None:
              raise Exception('Cannot add event detection data for a read that does not exist.')
          info = read_info[index]
          read_attrs.update({'read_id': info.read_id,
                             'start_time': info.start_time,
                             'duration': info.duration,
                             'start_mux': info.start_mux,
                             'median_before': info.median_before})
          attrs = self.handle.get_analysis_attributes(read_group)
          if attrs is None:
              self.handle.add_analysis_subgroup(self.group_name, 'Reads/Read_{}'.format(read_number),
                                                attrs=read_attrs)
              self.handle.add_analysis_dataset(read_group, 'Events', data)
          else:
              raise Exception('Event detection data already exists for this analysis and read.')