def event(annotation, **kwargs):
times, values = annotation.to_interval_values()<EOL>if any(values):<EOL><INDENT>labels = values<EOL><DEDENT>else:<EOL><INDENT>labels = None<EOL><DEDENT>return mir_eval.display.events(times, labels=labels, **kwargs)<EOL>
Plotting wrapper for events