Reading volume 1 of Weinberg's QFT book, chapter 12, page 505 he says that if you consider a diagram with degree of divergence $D\geq{}0$, its contribution can written as a polynomial of order $D$ in external momenta. As an example he considers the $D=1$ integral

$$\int_0^{\infty}\frac{k\,dk}{k+q}=a+bq+q\ln{q}$$

where $a$ and $b$ are divergent constants, and we see that we get a polynomial or order 1 in the external momenta $q$. He then says, and I quote

"Now, a polynomial term in external momenta is just what would be produced by adding suitable terms to the Lagrangian, if a graph with $E_f$ external lines of type $f$ (refering to field type) has degree of divergence $D\geq{}0$, then the ultraviolet divergent polynomial is the same as would be producedby adding various interactions $i$ with $n_{if}=E_f$ fields of type $f$ and $d_i\leq{}D$ derivatives."

can anybody elaborate on this a bit? in particular, how and where does the polynomial arise with the added Lagrangian term?