<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def transform(self, data):
 """ Transforms the data. """


        if not self._get("fitted"):
            raise RuntimeError("`transform` called before `fit` or `fit_transform`.")

        data = data.copy()
        output_column_prefix = self._get("output_column_prefix")

        if output_column_prefix is None:
            prefix = ""
        else:
            prefix = output_column_prefix + '.'

        transform_function = self._get("transform_function")

        feature_columns = self._get("features")
        feature_columns = _internal_utils.select_feature_subset(data, feature_columns)

        for f in feature_columns:
            data[prefix + f] = transform_function(data[f])

        return data