  We prove a pointwise ergodic theorem for quasi-probability-measure-preserving
(quasi-pmp) locally countable measurable graphs, equivalently, Schreier graphs
of quasi-pmp actions of countable groups. For ergodic graphs, the theorem gives
an increasing sequence of Borel subgraphs with finite connected components over
which the averages of any $L^1$ function converges to its expectation. This
implies that every (not necessarily pmp) locally countable ergodic Borel graph
on a standard probability space contains an ergodic hyperfinite subgraph. A
consequence of this is that every ergodic treeable equivalence relation has an
ergodic hyperfinite free factor.
  The pmp case of the main theorem was first proven by R. Tucker-Drob using a
deep result from probability theory. Our proof is different: it is
self-contained and applies more generally to quasi-pmp graphs. Among other
things, it involves introducing a graph invariant concerning asymptotic
averages of functions and a method of tiling a large part of the space with
finite sets with prescribed properties. The non-pmp setting additionally
exploits a new quasi-order called visibility to analyze the interplay between
the Radon--Nikodym cocycle and the graph structure, providing a sufficient
condition for hyperfiniteness.
