import re


def event_referenced_ids(ann):
    """
    Given a line with an event annotation, returns a collection
    containing the IDs referred to.
    """
    fields = ann.split("\t")
    if len(fields) < 2:
        return []
    args = fields[1].split(" ")
    ids = []
    for a in args:
        m = re.match(r'\S+:([A-Z]\d+)', a)
        if m:
            ids.append(m.group(1))
    return ids