<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def trim_columns(self, columns_to_trim):
 """ remove column in design matrix """

        # TODO check if trimmed column is actually one of the columns
        if len(self._trimmed_columns) == 0:
            self._trimmed_columns.append(columns_to_trim)
        else:
            self._trimmed_columns.extend(columns_to_trim)
        self._trimmed_columns = self._trimmed_columns[0]
        self.encoder['trimmed_columns'] = self._trimmed_columns