def process_events(my_gene, event, ioe_writer, gtf_writer, edge_len, th):
    """
    Generates specified event occurrences in gene and writes the GTF/IOE output
    """
    gene_event = event(my_gene, th)
    for event_repr, etype in gene_event.export_events_ioe():
        ioe_writer.write(event_repr, etype)
    for gtf_line, etype in gene_event.export_events_gtf(edge_len):
        gtf_writer.write(gtf_line, etype)
