Construction of energy density functional for arbitrary spin polarization using functional renormalization group