  We present a model for simulating Carbon Monoxide (CO) rotational line
emission in molecular clouds, taking account of their 3D spatial distribution
in galaxies with different geometrical properties. The model implemented is
based on recent results in the literature and has been designed for performing
Monte-Carlo simulations of this emission. We compare the simulations produced
with this model and calibrate them, both on the map level and on the power
spectrum level, using the second release of data from the Planck satellite for
the Galactic plane, where the signal-to-noise ratio is highest. We use the
calibrated model to extrapolate the CO power spectrum at low Galactic latitudes
where no high sensitivity observations are available yet. We then forecast the
level of unresolved polarized emission from CO molecular clouds which could
contaminate the power spectrum of Cosmic Microwave Background (CMB)
polarization B-modes away from the Galactic plane. Assuming realistic levels of
the polarization fraction, we show that the level of contamination is
equivalent to a cosmological signal with $r \lesssim 0.02$. The Monte-Carlo
MOlecular Line Emission (MCMole3D) Python package, which implements this model,
is being made publicly available.
