<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_lasers_3d(ax, lasers, name=None, distances=None, lim=None):

 """Draw MOT lasers in 3d."""

    if distances is None: distances = [1.0 for i in range(len(lasers))]
    for i in range(len(lasers)):
        if type(lasers[i]) == PlaneWave:
            draw_plane_wave_3d(ax, lasers[i], distances[i])
        elif type(lasers[i]) == MotField:
            draw_mot_field_3d(ax, lasers[i], distances[i])

    ax.set_xlabel(r"$x$", fontsize=20)
    ax.set_ylabel(r"$y$", fontsize=20)
    ax.set_zlabel(r"$z$", fontsize=20)

    if lim is None: lim = sqrt(2.0)

    ax.set_xlim(-lim, lim)
    ax.set_ylim(-lim, lim)
    ax.set_zlim(-lim, lim)
    ax.set_aspect("equal")

    if name is not None:
        pyplot.savefig(name, bbox_inches='tight')