code: def test_read_lightningignore(tmpdir):
      """_read_lightningignore() removes comments from ignore files."""
      test_path = tmpdir.join(".lightningignore")
      expected = "test"
      not_expected = "# comment"
      with open(test_path, "a") as f:
          f.write(not_expected)
          f.write(expected)
  
      result = _read_lightningignore(test_path)
      assert not_expected not in result
      assert expected not in result
  
imports: import os
  from lightning.app.source_code.copytree import _copytree, _read_lightningignore
label_desc: Use image node_id 1 for calling a global function with example usage: test_read_lightningignore(tmpdir) without return types