<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_series(filename, plot_kwargs=None):
    '''Plot series data from MonitorSeries output text file.

    Args:
        filename (str): Path to *.series.txt file produced by :obj:`~nnabla.MonitorSeries` class.
        plot_kwags (dict, optional):
            Keyward arguments passed to :function:`matplotlib.pyplot.plot`.

    Note:
        matplotlib package is required.

    '''
    import matplotlib.pyplot as plt

    if plot_kwargs is None:
        plot_kwargs = {}

    data = np.genfromtxt(filename, dtype='i8,f4', names=['k', 'v'])
    index = data['k']
    values = data['v']
    plt.plot(index, values, **plot_kwargs)