<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_primary_key(self, columns, index_name=False):
 """ Set the primary key. :type columns: list :type index_name: str or bool :rtype: Table """

        self._add_index(
            self._create_index(columns, index_name or "primary", True, True)
        )

        for column_name in columns:
            column = self.get_column(column_name)
            column.set_notnull(True)

        return self