title: Python-docx: convert type <class 'docx.oxml.text.run.CT_R'> to <class 'docx.text.run.Run'> to apply a highlight
body: <p>I have a function using python-docx which outputs a CT_R object. I'd like to be able to convert it to a Run object such that I can then apply a styling change, something like:</p>
  <p><code>font.highlight_color = WD_COLOR_INDEX.YELLOW</code></p>
  <p>As it stands, trying to apply the styling change to the CT_R object is giving an error. How can I convert the object of type &lt;class 'docx.oxml.text.run.CT_R'&gt; to an object of type &lt;class 'docx.text.run.Run'&gt;? I tried to write</p>
  <p><code>Run(r, paragraph)</code></p>
  <p>with 'r' being the CT_R variable, but I am getting an error that &quot;NameError: name 'Run' is not defined&quot;.</p>
  <p>I think a run is the parent class of CT_R but I cannot figure out the conversion. Thanks for the help in advance!</p>