class_docstr: DatasetBuilder for sift1m dataset.
docstr: Pulls data from hdf5 into splits.
docstr_tok: ["Pulls","data","from","hdf5","into","splits","."]
code: def _generate_examples(self, path, is_database):
      """Pulls data from hdf5 into splits."""
      with tf.io.gfile.GFile(path["file"], "rb") as f:
          with h5py.File(f, "r") as dataset_file:
              if is_database:
                  for idx, val in enumerate(dataset_file["train"]):
                      yield idx, {
                          "index": idx,
                          "embedding": val,
                          "neighbors": [],
                      }
              else:
                  for idx, (val, n_indices, distances) in enumerate(
                      zip(
                          dataset_file["test"],
                          dataset_file["neighbors"],
                          dataset_file["distances"],
                      )
                  ):
                      neighbors = []
                      for nn_idx, nn_dist in zip(n_indices, distances):
                          neighbors.append(
                              {"index": nn_idx, "distance": nn_dist}
                          )
                      yield idx, {
                          "index": idx,
                          "embedding": val,
                          "neighbors": neighbors,
                      }
  
file_path: datasets/tensorflow_datasets/datasets/sift1m/sift1m_dataset_builder.py
imports: import h5py
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the Builder obj's underlying member method code with example usage: obj._generate_examples(path, is_database) without return types