<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def acceptance_fractions(mean_acceptance_fractions, burn=None, ax=None):
 """ Plot the meana cceptance fractions for each MCMC step. :param mean_acceptance_fractions: The acceptance fractions at each MCMC step. :type mean_acceptance_fractions: :class:`numpy.array` :param burn: [optional] The burn-in point. If provided, a dashed vertical line will be shown at the burn-in point. :type burn: int :param ax: [optional] The axes to plot the mean acceptance fractions on. :type ax: :class:`matplotlib.axes.AxesSubplot` :returns: The acceptance fractions figure. """



    factor = 2.0
    lbdim = 0.2 * factor
    trdim = 0.2 * factor
    whspace = 0.10
    dimy = lbdim + factor + trdim
    dimx = lbdim + factor + trdim

    if ax is None:
        fig, ax = plt.subplots()
    else:
        fig = ax.figure

    lm = lbdim / dimx
    bm = lbdim / dimy
    trm = (lbdim + factor) / dimy
    fig.subplots_adjust(left=lm, bottom=bm, right=trm, top=trm,
        wspace=whspace, hspace=whspace)

    ax.plot(mean_acceptance_fractions, color="k", lw=2)

    if burn is not None:
        ax.axvline(burn, linestyle=":", color="k")

    ax.set_xlim(0, len(mean_acceptance_fractions))

    ax.xaxis.set_major_locator(MaxNLocator(5))
    [l.set_rotation(45) for l in ax.get_xticklabels()]
    ax.yaxis.set_major_locator(MaxNLocator(5))
    [l.set_rotation(45) for l in ax.get_yticklabels()]

    ax.set_xlabel("Step")
    ax.set_ylabel("$\langle{}a_f\\rangle$")
    fig.tight_layout()

    return fig