code: def _unwrap_one_layer(r, L, n):
      
      try:
          L[0]
      except (TypeError, IndexError):
          L = np.ones([r.shape[1]]) * L
      if n == 0:
          return list(r)
      rcu = []
      for x, y in r:
          for ix in range(-n, n + 1):
              for iy in range(-n, n + 1):
                  if abs(ix) == n or abs(iy) == n:
                      rcu.append(np.array([x + ix * L[0], y + iy * L[1]]))
      return rcu
docs: 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.