code: def create_test_data(self) -> None:
      datafiles = self._create_data_files()
      files_info = []
  
      for i, file in enumerate(datafiles):
          files_info.append(
              {
                  "dtype": self.data_type,
                  "format": "npy",
                  "name": file,
                  "size": self.file_sizes[i],
              }
          )
  
      config_for_yaml = {
          "d": self.dimension,
          "output": self.tempdir,
          "index": self.index_factory,
          "nprobe": self.nprobe,
          "k": self.k,
          "normalise": self.normalise,
          "metric": self.metric,
          "training_sample": self.training_sample,
          "evaluation_sample": self.evaluation_sample,
          "index_shard_size": self.index_shard_size,
          "query_batch_size": self.query_batch_size,
          "datasets": {
              self.ds_name: {
                  "root": self.tempdir,
                  "size": sum(self.file_sizes),
                  "files": files_info,
              }
          },
      }
      if self.evaluate_by_margin:
          config_for_yaml[
              "evaluate_by_margin"
          ] = self.evaluate_by_margin
      q_datafiles = self._create_data_files("my_q_data")
      q_files_info = []
  
      for i, file in enumerate(q_datafiles):
          q_files_info.append(
              {
                  "dtype": self.data_type,
                  "format": "npy",
                  "name": file,
                  "size": self.file_sizes[i],
              }
          )
      if self.with_queries_ds:
          config_for_yaml["datasets"][self.qs_name] = {
              "root": self.tempdir,
              "size": sum(self.file_sizes),
              "files": q_files_info,
          }
  
      self._create_config_yaml(config_for_yaml)
  
file_path: faiss/demos/offline_ivf/tests/testing_utils.py
imports: import argparse
  import yaml
  import numpy
  from typing import Dict, List, Optional
label_desc: Use image node_id 2 for calling the TestDataCreator obj's underlying member method code with example usage: obj.create_test_data() without return types