<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def plot_labels(ax, label_fontsize=14, xlabel=None, xlabel_arg=None, ylabel=None, ylabel_arg=None, zlabel=None, zlabel_arg=None):
 """Sets the labels options of a matplotlib plot Args: ax: matplotlib axes label_fontsize(int):
 Size of the labels' font xlabel(str):
 The xlabel for the figure xlabel_arg(dict):
 Passsed into matplotlib as xlabel arguments ylabel(str):
 The ylabel for the figure ylabel_arg(dict):
 Passsed into matplotlib as ylabel arguments zlabel(str):
 The zlabel for the figure zlabel_arg(dict):
 Passsed into matplotlib as zlabel arguments """

    xlabel = xlabel if xlabel is not None else ax.get_xlabel() or 'X'
    ylabel = ylabel if ylabel is not None else ax.get_ylabel() or 'Y'

    xlabel_arg = dict_if_none(xlabel_arg)
    ylabel_arg = dict_if_none(ylabel_arg)

    ax.set_xlabel(xlabel, fontsize=label_fontsize, **xlabel_arg)
    ax.set_ylabel(ylabel, fontsize=label_fontsize, **ylabel_arg)

    if hasattr(ax, 'zaxis'):
        zlabel = zlabel if zlabel is not None else ax.get_zlabel() or 'Z'
        zlabel_arg = dict_if_none(zlabel_arg)
        ax.set_zlabel(zlabel, fontsize=label_fontsize, **zlabel_arg)