https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#data-dependent-conditional-execution claims to be a complete example, but it isn't. In addition, there are some indentation errors with one of the code snippets in that section