<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, measurement, output_format='array'):
 """ Method to predict the class labels for the provided data :param measurement: the point to classify :type measurement: pandas.DataFrame :param output_format: the format to return the scores ('array' or 'str') :type output_format: string :return prediction: the prediction for a given test/point :rtype prediction: np.array """

        scores = np.array([])
        for obs in self.observations:
            knn = self.__get_knn_by_observation(obs)
            p, ids = self.__get_features_for_observation(data_frame=measurement, observation=obs,
                                                         skip_id=3497, last_column_is_id=True)

            score = knn.predict(pd.DataFrame(p).T)
            scores = np.append(scores, score, axis=0)

        if output_format == 'array':
            return scores.astype(int)
        else:
            return np.array_str(scores.astype(int))