code: def create_tab(self, location=None):
          
          eb = self._get_or_create_editor_buffer(location)
  
          self.tab_pages.insert(self.active_tab_index + 1, TabPage(Window(eb)))
          self.active_tab_index += 1
docs: Create a new tab page.