code: def test_unpublished_component_url_parsing():
      runner = CliRunner()
  
      # assert a bad name should fail (no git@)
      fake_component = (
          "https://github.com/Lightning-AI/LAI-slack-messenger"
      )
      result = runner.invoke(
          lightning_cli.cmd_install.install_component, [fake_component]
      )
      assert (
          "Error, your github url must be in the following format"
          in result.output
      )
  
      # assert a good (and availablea name) works
      sha = "14f333456ffb6758bd19458e6fa0bf12cf5575e1"
      real_component = f"git+https://github.com/Lightning-AI/LAI-slack-messenger.git@{sha}"
      result = runner.invoke(
          lightning_cli.cmd_install.install_component, [real_component]
      )
      assert "Press enter to continue:" in result.output
  
imports: import os
  import subprocess
  from pathlib import Path
  from unittest import mock
  import pytest
  from click.testing import CliRunner
  from lightning.app.cli import cmd_install, lightning_cli
  from lightning.app.testing.helpers import _RunIf
label_desc: Use image node_id 5 for calling a global function with example usage: test_unpublished_component_url_parsing() without return types