def get_enzyme_reactions(eid, db):
    """
    For a given ec number return associated reaction ids
    :param eid: enzyme id format "EC-x.x.x.x"
    :param db: database dict
    :return:
    """
    erids = []
    if eid[:3] != 'EC-':
        eid = 'EC-{}'.format(eid)
    for rid, react in db['reactions'].items():
        if 'EC-NUMBER' in react and eid in react['EC-NUMBER']:
            erids.append(rid)
    return erids
