class_docstr: Evaluate a model based on a triplet: (sentence, positive_example, negative_example).
      Checks if distance(sentence, positive_example) < distance(sentence, negative_example).
code: def from_input_examples(cls, examples: List[InputExample], **kwargs):
      anchors = []
      positives = []
      negatives = []
  
      for example in examples:
          anchors.append(example.texts[0])
          positives.append(example.texts[1])
          negatives.append(example.texts[2])
      return cls(anchors, positives, negatives, **kwargs)
  
file_path: sentence-transformers/sentence_transformers/evaluation/TripletEvaluator.py
imports: from .None import SentenceEvaluator, SimilarityFunction
  import logging
  import os
  import csv
  from sklearn.metrics.pairwise import paired_cosine_distances, paired_euclidean_distances, paired_manhattan_distances
  from typing import List
  from ..readers import InputExample
label_desc: Use image node_id 2 for calling the TripletEvaluator obj's underlying member method code with example usage: obj.from_input_examples(cls, examples) and returns: cls