Background
As discussed in this question, line numbers can be activated in code cells in a JupyterLab notebook. It shows line numbers in the code cells only. The output cells do not have line numbers.
Question
How to display line numbers in the output cell?