Linear game non-contextuality and Bell inequalities—a graph-theoretic approach