code: def test_validate_init_name():
      # test that a good name works (mix chars)
      value = cmd_init._capture_valid_app_component_name("abc1-cde")
      assert value == "abc1-cde"
  
      # test that a good name works (letters only)
      value = cmd_init._capture_valid_app_component_name("abc-cde")
      assert value == "abc-cde"
  
      # assert bad input
      with pytest.raises(SystemExit) as e:
          value = cmd_init._capture_valid_app_component_name("abc-cde#")
  
      assert "Error: your Lightning app name" in str(e.value)
  
file_path: pytorch-lightning/tests/tests_app/cli/test_cmd_init.py
imports: import contextlib
  import os
  import re
  import shutil
  import subprocess
  import pytest
  from lightning.app.cli import cmd_init
  from lightning.app.utilities.imports import _IS_MACOS, _IS_WINDOWS
label_desc: Use image node_id 1 for calling a global function with example usage: test_validate_init_name() without return types