<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_coupling_matrix(self, lmax, nwin=None, weights=None, mode='full', axes_labelsize=None, tick_labelsize=None, show=True, ax=None, fname=None):
 """ Plot the multitaper coupling matrix. This matrix relates the global power spectrum to the expectation of the localized multitaper spectrum. Usage ----- x.plot_coupling_matrix(lmax, [nwin, weights, mode, axes_labelsize, tick_labelsize, show, ax, fname]) Parameters lmax : int Spherical harmonic bandwidth of the global power spectrum. nwin : int, optional, default = x.nwin Number of tapers used in the mutlitaper spectral analysis. weights : ndarray, optional, default = x.weights Taper weights used with the multitaper spectral analyses. mode : str, opitonal, default = 'full' 'full' returns a biased output spectrum of size lmax+lwin+1. The input spectrum is assumed to be zero for degrees l>lmax. 'same' returns a biased output spectrum with the same size (lmax+1) as the input spectrum. The input spectrum is assumed to be zero for degrees l>lmax. 'valid' returns a biased spectrum with size lmax-lwin+1. This returns only that part of the biased spectrum that is not influenced by the input spectrum beyond degree lmax. axes_labelsize : int, optional, default = None The font size for the x and y axes labels. tick_labelsize : int, optional, default = None The font size for the x and y tick labels. show : bool, optional, default = True If True, plot the image to the screen. ax : matplotlib axes object, optional, default = None An array of matplotlib axes objects where the plots will appear. fname : str, optional, default = None If present, save the image to the specified file. """

        figsize = (_mpl.rcParams['figure.figsize'][0],
                   _mpl.rcParams['figure.figsize'][0])

        if axes_labelsize is None:
            axes_labelsize = _mpl.rcParams['axes.labelsize']
        if tick_labelsize is None:
            tick_labelsize = _mpl.rcParams['xtick.labelsize']

        if ax is None:
            fig = _plt.figure(figsize=figsize)
            axes = fig.add_subplot(111)
        else:
            axes = ax

        axes.imshow(self.coupling_matrix(lmax, nwin=nwin, weights=weights,
                                         mode=mode), aspect='auto')
        axes.set_xlabel('Input power', fontsize=axes_labelsize)
        axes.set_ylabel('Output power', fontsize=axes_labelsize)
        axes.tick_params(labelsize=tick_labelsize)
        axes.minorticks_on()

        if ax is None:
            fig.tight_layout(pad=0.5)
            if show:
                fig.show()
            if fname is not None:
                fig.savefig(fname)
            return fig, axes