code: def validate_data(gtFilePath, submFilePath, evaluationParams):
      """
      Method validate_data: validates that all files in the results folder are correct (have the correct name contents).
                              Validates also that there are no missing files in the folder.
                              If some error detected, the method raises the error
      """
      gt = rrc_evaluation_funcs.load_folder_file(
          gtFilePath, evaluationParams["GT_SAMPLE_NAME_2_ID"]
      )
  
      subm = rrc_evaluation_funcs.load_folder_file(
          submFilePath, evaluationParams["DET_SAMPLE_NAME_2_ID"], True
      )
  
      # Validate format of GroundTruth
      for k in gt:
          rrc_evaluation_funcs.validate_lines_in_file(
              k,
              gt[k],
              evaluationParams["CRLF"],
              evaluationParams["LTRB"],
              True,
          )
  
      # Validate format of results
      for k in subm:
          if (k in gt) == False:
              raise Exception("The sample %s not present in GT" % k)
  
          rrc_evaluation_funcs.validate_lines_in_file(
              k,
              subm[k],
              evaluationParams["CRLF"],
              evaluationParams["LTRB"],
              False,
              evaluationParams["CONFIDENCES"],
          )
  
file_path: PaddleOCR/benchmark/PaddleOCR_DBNet/utils/cal_recall/script.py
imports: from collections import namedtuple
  from .None import rrc_evaluation_funcs
  import Polygon
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: validate_data(gtFilePath, submFilePath, evaluationParams) without return types