<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def updateSpiketrace(self, xdata, ydata, plotname=None):
 """Updates the spike trace :param xdata: index values :type xdata: numpy.ndarray :param ydata: values to plot :type ydata: numpy.ndarray """

        if plotname is None:
            plotname = self.responsePlots.keys()[0]

        if len(ydata.shape) == 1:
            self.responsePlots[plotname].updateData(axeskey='response', x=xdata, y=ydata)
        else:
            self.responsePlots[plotname].addTraces(xdata, ydata)