def get_examples_v2(self, is_train, max_cand, query_info,
                      passage_infos_positive, passage_infos_negative):
    """Generating examples by grouping the canidates into records."""
    examples = []
    if is_train and not passage_infos_positive:
      return examples
    for input_example in self.get_examples_v2_iterate(is_train, max_cand,
                                                      query_info,
                                                      passage_infos_positive,
                                                      passage_infos_negative):
      examples.append(input_example)
    return examples
Generating examples by grouping the canidates into records.
language/multivec/preprocessing/create_training_data.py