<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_surface_state(self, data=None):
 """Return the Euclidean distance between codebook and data. :param data: Optional parameter to specify data, otherwise the data used previously to train the SOM is used. :type data: 2D numpy.array of float32. :returns: The the dot product of the codebook and the data. :rtype: 2D numpy.array """


        if data is None:
            d = self._data
        else:
            d = data

        codebookReshaped = self.codebook.reshape(self.codebook.shape[0] * self.codebook.shape[1], self.codebook.shape[2])
        parts = np.array_split(d, 200, axis=0)
        am = np.empty((0, (self._n_columns * self._n_rows)), dtype="float64")
        for part in parts:
            am = np.concatenate((am, (cdist((part), codebookReshaped, 'euclidean'))), axis=0)

        if data is None:
            self.activation_map = am
        return am