  Fix $\varepsilon>0$ and a nonnull graph $H$. A well-known theorem of R\"odl
from the 80s says that every graph $G$ with no induced copy of $H$ contains a
linear-sized $\varepsilon$-restricted set $S\subseteq V(G)$, which means $S$
induces a subgraph with maximum degree at most $\varepsilon\vert S\vert$ in $G$
or its complement. There are two extensions of this result:
  $\bullet$ quantitatively, Nikiforov (and later Fox and Sudakov) relaxed the
condition "no induced copy of $H$" into "at most $\kappa\vert G\vert^{\vert
H\vert}$ induced copies of $H$ for some $\kappa>0$ depending on $H$ and
$\varepsilon$"; and
  $\bullet$ qualitatively, Chudnovsky, Scott, Seymour, and Spirkl recently
showed that there exists $N>0$ depending on $H$ and $\varepsilon$ such that $G$
is $(N,\varepsilon)$-restricted, which means $V(G)$ has a partition into at
most $N$ subsets that are $\varepsilon$-restricted.
  A natural common generalization of these two asserts that every graph $G$
with at most $\kappa\vert G\vert^{\vert H\vert}$ induced copies of $H$ is
$(N,\varepsilon)$-restricted for some $\kappa,N>0$ depending on $H$ and
$\varepsilon$. This is unfortunately false, but we prove that for every
$\varepsilon>0$, $\kappa$ and $N$ still exist so that for every $d\ge0$, every
graph with at most $\kappa d^{\vert H\vert}$ induced copies of $H$ has an
$(N,\varepsilon)$-restricted induced subgraph on at least $\vert G\vert-d$
vertices. This unifies the two aforementioned theorems, and is optimal up to
$\kappa$ and $N$ for every value of $d$.
