<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fit_transform(self, X, y=None, **fit_params):
 """Fit label encoder and return encoded labels Parameters y : array-like of shape [n_samples] Target values. Returns ------- y : array-like of shape [n_samples] """

        y = column_or_1d(X, warn=True)
        _check_numpy_unicode_bug(X)
        self.classes_, X = np.unique(X, return_inverse=True)
        return X