code: def _read_lightningignore(path: Path) -> Set[str]:
      """Reads ignore file and filter and empty lines. This will also remove patterns that start with a `/`. That's done
      to allow `glob` to simulate the behavior done by `git` where it interprets that as a root path.
  
      Parameters
      ----------
      path: Path
          Path to .lightningignore file or equivalent.
  
      Returns
      -------
      Set[str]
          Set of unique lines.
  
      """
      raw_lines = path.open().readlines()
      return _parse_lightningignore(raw_lines)
  
file_path: pytorch-lightning/src/lightning/app/source_code/copytree.py
imports: import fnmatch
  import os
  from functools import partial
  from pathlib import Path
  from shutil import Error, copy2, copystat
  from typing import Callable, List, Optional, Set, Tuple, Union
  from lightning.app.core.constants import DOT_IGNORE_FILENAME
  from lightning.app.utilities.app_helpers import Logger
label_desc: Use image node_id 4 for calling a global function with example usage: _read_lightningignore(path) and returns: _parse_lightningignore