def next_level(self, column_names: list[str]) -> int:
        """Return the next available spanner level.

        Spanners whose columns do not overlap are put on the same level.
        """

        if not len(self):
            return 0

        overlapping_levels = [
            span.spanner_level for span in self if any(v in column_names for v in span.vars)
        ]

        return max(overlapping_levels, default=-1) + 1
Return the next available spanner level.

        Spanners whose columns do not overlap are put on the same level.
        
great_tables/_gt_data.py