code: def validate_sentence_format(sentence, i_start, file):
      global error_count
      base_name = basename(file)
      nodes = sentence.strip().split("\n")
      comment_nodes = [node for node in nodes if node.startswith("#")]
      has_sent_id = False
      has_text = False
      for comment_node in comment_nodes:
          if comment_node.startswith("# sent_id = "):
              has_sent_id = True
          if comment_node.startswith("# text = "):
              has_text = True
      if not has_sent_id:
          warn(
              message="Sentence must has sent_id",
              error_type="Format no-sent_id",
              file=base_name,
              line_number=i_start,
              level=2,
          )
      if not has_text:
          warn(
              message="Sentence must has text",
              error_type="Format no-text",
              file=base_name,
              line_number=i_start,
              level=2,
          )
  
file_path: underthesea/underthesea/corpus/validate_corpus.py
imports: import sys
  from os import listdir
  from os.path import join, basename
  import charset_normalizer
  from underthesea.feature_engineering.text import Text
  from underthesea.file_utils import DATASETS_FOLDER
  from underthesea.pipeline.word_tokenize import tokenize
label_desc: Use image node_id 6 for calling a global function with example usage: validate_sentence_format(sentence, i_start, file) without return types