<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_patch(ax, color, pts_per_edge, *edges):
 """Add a polygonal surface patch to a plot. Args: ax (matplotlib.artist.Artist):
 A matplotlib axis. color (Tuple[float, float, float]):
 Color as RGB profile. pts_per_edge (int):
 Number of points to use in polygonal approximation of edge. a boundary. """

    from matplotlib import patches
    from matplotlib import path as _path_mod

    s_vals = np.linspace(0.0, 1.0, pts_per_edge)
    # Evaluate points on each edge.
    all_points = []
    for edge in edges:
        points = edge.evaluate_multi(s_vals)
        # We assume the edges overlap and leave out the first point
        # in each.
        all_points.append(points[:, 1:])
    # Add first point as last point (polygon is closed).
    first_edge = all_points[0]
    all_points.append(first_edge[:, [0]])
    # Add boundary first.
    polygon = np.asfortranarray(np.hstack(all_points))
    line, = ax.plot(polygon[0, :], polygon[1, :], color=color)
    # Reset ``color`` in case it was ``None`` and set from color wheel.
    color = line.get_color()
    # ``polygon`` is stored Fortran-contiguous with ``x-y`` points in each
    # column but ``Path()`` wants ``x-y`` points in each row.
    path = _path_mod.Path(polygon.T)
    patch = patches.PathPatch(path, facecolor=color, alpha=0.625)
    ax.add_patch(patch)