docstr: A special data loader to be used with MultipleNegativesRankingLoss.
  The data loader ensures that there are no duplicate sentences within the same batch
docstr_tok: ["A","special","data","loader","to","be","used","with","MultipleNegativesRankingLoss",".","The","data","loader","ensures","that","there","are","no","duplicate","sentences","within","the","same","batch"]
code: def __init__(self, train_examples, batch_size):
      """
      A special data loader to be used with MultipleNegativesRankingLoss.
      The data loader ensures that there are no duplicate sentences within the same batch
      """
      self.batch_size = batch_size
      self.data_pointer = 0
      self.collate_fn = None
      self.train_examples = train_examples
      random.shuffle(self.train_examples)
  
imports: import random
  import math
label_desc: Use image node_id 1 to create a new NoDuplicatesDataLoader object  with example: obj = NoDuplicatesDataLoader(train_examples, batch_size)