By 2-twist-spinning the knotted graph that represents the knotted handlebody $5_2$, we obtain a knotted foam in 4-dimensional space with a non-trivial quandle cocycle invariant.