code: def test_pl_app_relative_paths(
      _, __, cwd, source_dir, script_path, tmp_path, monkeypatch
  ):
      source_dir = tmp_path / source_dir
      source_dir.mkdir(parents=True, exist_ok=True)
      script_path = tmp_path / script_path
      script_path.parent.mkdir(parents=True, exist_ok=True)
      script_path.touch()
      cwd = tmp_path / cwd
      monkeypatch.chdir(cwd)
  
      pl_app(
          source_dir=str(source_dir),
          script_path=str(script_path),
          name="app-name",
          overwrite=False,
      )
      assert (cwd / "app-name").is_dir()
  
      expected_source_files = set(os.listdir(source_dir))
      if cwd == source_dir:
          expected_source_files.remove("app-name")
      assert (
          set(os.listdir(cwd / "app-name" / "source"))
          == expected_source_files
      )
  
file_path: pytorch-lightning/tests/tests_app/cli/test_cmd_pl_init.py
imports: import os
  import sys
  from unittest import mock
  from unittest.mock import Mock
  import pytest
  from click.testing import CliRunner
  from lightning.app.cli import lightning_cli
  from lightning.app.cli.cmd_pl_init import _can_encode_icon, download_frontend, pl_app
label_desc: Use image node_id 7 for calling a global function with example usage: test_pl_app_relative_paths(_, __, cwd, source_dir, script_path, tmp_path, monkeypatch) without return types