def _unwrap_to_layer(r, L, n=<NUM_LIT:1>):
rcu = []<EOL>for i_n in range(n + <NUM_LIT:1>):<EOL><INDENT>rcu.extend(_unwrap_one_layer(r, L, i_n))<EOL><DEDENT>return rcu<EOL>
For a set of points in a 2 dimensional periodic system, extend the set of
    points to tile the points up to to a given period.

    Parameters
    ----------
    r: float array, shape (:, 2).
        Set of points.
    L: float array, shape (2,)
        System lengths.
    n: integer.
        Period to unwrap up to.

    Returns
    -------
    rcu: float array, shape (:, 2).
        The set of points. tiled up to the periods at a distance `n` from the
        origin.