<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def predict(self, X, batch_size=1, show_progressbar=False):
 """ Predict the BMU for each input data. Parameters X : numpy array. The input data. batch_size : int, optional, default 100 The batch size to use in prediction. This may affect prediction in stateful, i.e. sequential SOMs. show_progressbar : bool Whether to show a progressbar during prediction. Returns ------- predictions : numpy array An array containing the BMU for each input data point. """

        dist = self.transform(X, batch_size, show_progressbar)
        res = dist.__getattribute__(self.argfunc)(1)

        return res