<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def insert_cols(self, col, no_cols=1):
 """Adds no_cols columns before col, appends if col > maxcols and marks grid as changed """


        # Mark content as changed
        post_command_event(self.main_window, self.ContentChangedMsg)

        tab = self.grid.current_table

        self.code_array.insert(col, no_cols, axis=1, tab=tab)