'Set the modulus of ``f``.
Examples
>>> from sympy import Poly
>>> from sympy.abc import x
>>> Poly(5*x**2 + 2*x - 1, x).set_modulus(2)
Poly(x**2 + 1, x, modulus=2)'

def set_modulus(f, modulus):

    modulus = options.Modulus.preprocess(modulus)
    return f.set_domain(FF(modulus))
