def p_factor_list(p):
    if len(p) == 2 and p[1] is None:
        p[0] = []
    else:
        p[0] = [p[1]] + p[2]
factor_list : factor factor_list
dataset/ETHPy150Open armon/pypred/pypred/parser.py/p_factor_list