class_docstr: Exports critique request results.
  
  The request results will be imported from all files matching
  turk/{template.name}/Batch_{batch_number}_batch_results.csv
class_docstr_tok: ["Exports","critique","request","results",".","The","request","results","will","be","imported","from","all","files","matching","turk\/","{","template.name","}","\/Batch_","{","batch_number","}","_batch_results.csv"]
docstr: Initialize the instance.
  
  Thread-hostile.
  Must be called exactly once per instance.
  Must be called before `import_request_result()`.
docstr_tok: ["Initialize","the","instance",".","Thread-hostile",".","Must","be","called","exactly","once","per","instance",".","Must","be","called","before","`","import_request_result","(",")","`","."]
code: def initialize(self) -> None:
      """Initialize the instance.
  
      Thread-hostile.
      Must be called exactly once per instance.
      Must be called before `import_request_result()`."""
      if not os.path.exists(
          self._get_directory_path()
      ) or not os.path.isdir(self._get_directory_path()):
          return
  
      for file_name in os.listdir(self._get_directory_path()):
          if re.match("Batch_\\d+_batch_results.csv", file_name):
              file_path = os.path.join(
                  self._get_directory_path(), file_name
              )
              hlog(
                  f"Importing Mechanical Turk results from {file_path}"
              )
              self._import_from_file_path(file_path)
  
file_path: H2O/h2o_hf/helm/src/helm/proxy/clients/mechanical_turk_critique_importer.py
imports: from collections import defaultdict
  import csv
  import os
  from threading import Lock
  from typing import Dict, List, Optional, Tuple, Union
  import re
  from helm.common.critique_request import CritiqueRequest, CritiqueResponse, CritiqueTaskTemplate, QuestionType, CritiqueRequestResult
  from helm.common.hierarchical_logger import hlog
label_desc: Use image node_id 7 for calling the _MechanicalTurkRequestImporter obj's underlying member method code with example usage: obj.initialize() without return types