class_docstr: Youtube List Comments  by video id Table implementation
class_docstr_tok: ["Youtube","List","Comments","by","video","id","Table","implementation"]
docstr: Inserts data into the YouTube POST /commentThreads API endpoint.
  
  Parameters
  ----------
  query : ast.Insert
      Given SQL INSERT query
  
  Returns
  -------
  None
  
  Raises
  ------
  ValueError
      If the query contains an unsupported condition
docstr_tok: ["Inserts","data","into","the","YouTube","POST","\/commentThreads","API","endpoint",".","Parameters","--","--","--","--","--","query",":","ast.Insert","Given","SQL","INSERT","query","Returns","--","--","--","-","None","Raises","--","--","--","ValueError","If","the","query","contains","an","unsupported","condition"]
code: def insert(self, query: ast.Insert) -> None:
      """Inserts data into the YouTube POST /commentThreads API endpoint.
  
      Parameters
      ----------
      query : ast.Insert
          Given SQL INSERT query
  
      Returns
      -------
      None
  
      Raises
      ------
      ValueError
          If the query contains an unsupported condition
      """
  
      insert_query_parser = INSERTQueryParser(query, self.get_columns())
  
      values_to_insert = insert_query_parser.parse_query()
  
      for value in values_to_insert:
          if not value.get("comment_id"):
              if not value.get("comment"):
                  raise ValueError(
                      f"comment is mandatory for inserting a top-level comment."
                  )
              else:
                  self.insert_comment(
                      video_id=value["video_id"], text=value["comment"]
                  )
  
          else:
              if not value.get("reply"):
                  raise ValueError(
                      f"reply is mandatory for inserting a reply."
                  )
              else:
                  self.insert_comment(
                      comment_id=value["comment_id"],
                      text=value["reply"],
                  )
  
imports: from typing import List
  from mindsdb.integrations.libs.api_handler import APITable
  from mindsdb.integrations.utilities.sql_utils import extract_comparison_conditions
  from mindsdb.utilities import log
  from mindsdb_sql.parser import ast
  from mindsdb.integrations.handlers.utilities.query_utilities import SELECTQueryParser, SELECTQueryExecutor, INSERTQueryParser
  import pandas
  import re
  from youtube_transcript_api import YouTubeTranscriptApi
  from youtube_transcript_api.formatters import JSONFormatter
label_desc: Use image node_id 2 for calling the YoutubeCommentsTable obj's underlying member method code with example usage: obj.insert(query) without return types