def get_productions_d(productions):
    """ Get productions as a dictionary """
    productions_d = dict()
    for production in productions:
        production_head = productions_d.setdefault(production.head, [])
        production_head.append(production)
    return productions_d
