def _unwrap_one_layer(r, L, n):
try:<EOL><INDENT>L[<NUM_LIT:0>]<EOL><DEDENT>except (TypeError, IndexError):<EOL><INDENT>L = np.ones([r.shape[<NUM_LIT:1>]]) * L<EOL><DEDENT>if n == <NUM_LIT:0>:<EOL><INDENT>return list(r)<EOL><DEDENT>rcu = []<EOL>for x, y in r:<EOL><INDENT>for ix in range(-n, n + <NUM_LIT:1>):<EOL><INDENT>for iy in range(-n, n + <NUM_LIT:1>):<EOL><INDENT>if abs(ix) == n or abs(iy) == n:<EOL><INDENT>rcu.append(np.array([x + ix * L[<NUM_LIT:0>], y + iy * L[<NUM_LIT:1>]]))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return rcu<EOL>
For a set of points in a 2 dimensional periodic system, extend the set of
    points to tile the points at a given period.

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

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