<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def updateSpec(self, *args, **kwargs):
 """Updates the spectrogram. First argument can be a filename, or a data array. If no arguments are given, clears the spectrograms. For other arguments, see: :meth:`SpecWidget.updateData<sparkle.gui.plotting.pyqtgraph_widgets.SpecWidget.updateData>` """

        if args[0] is None:
            self.specPlot.clearImg()
        elif isinstance(args[0], basestring):
            self.specPlot.fromFile(*args, **kwargs)
        else:
            self.specPlot.updateData(*args,**kwargs)