code: def test_login_with_browser(
      click_launch: mock.MagicMock,
      head: mock.MagicMock,
      run: mock.MagicMock,
      port: mock.MagicMock,
  ):
      port.return_value = 1234
      login.Auth()._run_server()
      url = f"{LIGHTNING_CLOUD_URL}/sign-in?redirectTo=http%3A%2F%2Flocalhost%3A1234%2Flogin-complete"  # E501
      head.assert_called_once_with(url)
      click_launch.assert_called_once_with(url)
      run.assert_called_once()
  
file_path: pytorch-lightning/tests/tests_app/utilities/test_login.py
imports: import os
  from unittest import mock
  import pytest
  import requests
  from lightning.app.utilities import login
label_desc: Use image node_id 5 for calling a global function with example usage: test_login_with_browser(click_launch, head, run, port) without return types