Without adding additional Packages you can directly use :
from google.colab.output import eval_js print(eval_js("google.colab.kernel.proxyPort(5000)"))
this will provide you with the link that can be accessed remotely on your laptop