docs: def run(self):
          """ Parse a tab directive """
          self.assert_has_content()
          env = self.state.document.settings.env
  
          tabs_id = env.temp_data['tabs_stack'][-1]
          tabs_key = 'tabs_%d' % tabs_id
  
          args = self.content[0].strip()
          if args.startswith('{'):
              try:
                  args = json.loads(args)
                  self.content.trim_start(1)
              except ValueError:
                  args = {}
          else:
              args = {}
  
          tab_name = nodes.container()
          self.state.nested_parse(
              self.content[:1], self.content_offset, tab_name)
          args['tab_name'] = tab_name
  
          include_tabs_id_in_data_tab = False
          if 'tab_id' not in args:
              args['tab_id'] = env.new_serialno(tabs_key)
              include_tabs_id_in_data_tab = True
          i = 1
          while args['tab_id'] in env.temp_data[tabs_key]['tab_ids']:
              args['tab_id'] = '%s-%d' % (args['tab_id'], i)
              i += 1
          env.temp_data[tabs_key]['tab_ids'].append(args['tab_id'])
  
          data_tab = str(args['tab_id'])
          if include_tabs_id_in_data_tab:
              data_tab = '%d-%s' % (tabs_id, data_tab)
          data_tab = "sphinx-data-tab-{}".format(data_tab)
  
          env.temp_data[tabs_key]['tab_titles'].append(
              (data_tab, args['tab_name']))
  
          text = '\n'.join(self.content)
          node = nodes.container(text)
  
          classes = 'ui bottom attached sphinx-tab tab segment'
          node['classes'] = classes.split(' ')
          node['classes'].extend(args.get('classes', []))
          node['classes'].append(data_tab)
  
          if env.temp_data[tabs_key]['is_first_tab']:
              node['classes'].append('active')
              env.temp_data[tabs_key]['is_first_tab'] = False
  
          self.state.nested_parse(self.content[2:], self.content_offset, node)
  
          if env.app.builder.name not in get_compatible_builders(env.app):
              outer_node = nodes.container()
              tab = nodes.container()
              tab.tagname = 'a'
              tab['classes'] = ['item']
              tab += tab_name
  
              outer_node.append(tab)
              outer_node.append(node)
              return [outer_node]
  
          return [node]