def pick_monomials_of_degree(monomials, degree):
selected_monomials = []<EOL>for monomial in monomials:<EOL><INDENT>if ncdegree(monomial) == degree:<EOL><INDENT>selected_monomials.append(monomial)<EOL><DEDENT><DEDENT>return selected_monomials<EOL>
Collect all monomials up of a given degree.