How to draw rectangle around line/sentence in LibreOffice using Pyuno in python

Hi all,
I am trying to draw rectangle around line/sentence using pyuno in python script, so is it possible ? this feature I will use in next modification of my python script. so is it possible to Highlight line/sentence using rectangle in LibreOffice-Writer using pyuno.