<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def draw_medium(r, R, L, n=1, ax=None):
 """Draw circles representing circles in a two-dimensional periodic system. Circles may be tiled up to a number of periods. Parameters r: float array, shape (:, 2). Set of points. R: float Circle radius. L: float array, shape (2,) System lengths. n: integer. Period to unwrap up to. ax: matplotlib axes instance or None Axes to draw circles onto. If `None`, use default axes. Returns ------- None """

    if ax is None:
        ax = plt.gca()
    for ru in _unwrap_to_layer(r, L, n):
        c = plt.Circle(ru, radius=R, alpha=0.2)
        ax.add_artist(c)