Is there any way to run a line magic with sudo in IPython/Jupyter?

Directly prefixing a line magic with sudo didn’t work me. I wonder if there’s anyway to do this.