Statistics for Pure Pairs. VIII. Excluding a Sparse Graph.