def get_reload_paths() -> Sequence[Path]:
    """Get the reload paths for the backend.

    Returns:
        The reload paths for the backend.
    """
    config = get_config()
    reload_paths = [Path.cwd()]
    if (spec := importlib.util.find_spec(config.module)) is not None and spec.origin:
        module_path = Path(spec.origin).resolve().parent

        while module_path.parent.name and any(
            sibling_file.name == "__init__.py" for sibling_file in module_path.iterdir()
        ):
            # go up a level to find dir without `__init__.py`
            module_path = module_path.parent

        reload_paths = [module_path]

    include_dirs = tuple(
        map(Path.absolute, environment.REFLEX_HOT_RELOAD_INCLUDE_PATHS.get())
    )
    exclude_dirs = tuple(
        map(Path.absolute, environment.REFLEX_HOT_RELOAD_EXCLUDE_PATHS.get())
    )

    def is_excluded_by_default(path: Path) -> bool:
        if path.is_dir():
            if path.name.startswith("."):
                # exclude hidden directories
                return True
            if path.name.startswith("__"):
                # ignore things like __pycache__
                return True
        return path.name in (".gitignore", "uploaded_files")

    reload_paths = (
        tuple(
            path.absolute()
            for dir in reload_paths
            for path in dir.iterdir()
            if not is_excluded_by_default(path)
        )
        + include_dirs
    )

    if exclude_dirs:
        reload_paths = tuple(
            path
            for path in reload_paths
            if all(not path.samefile(exclude) for exclude in exclude_dirs)
        )

    console.debug(f"Reload paths: {list(map(str, reload_paths))}")

    return reload_paths
Get the reload paths for the backend.

    Returns:
        The reload paths for the backend.
    
reflex/utils/exec.py