code: def compute_pairwise_similarity_score(self):
          pairs = []
          all_scores = []
          for i, unit in enumerate(self.parsed_response):
              for j, other_unit in enumerate(self.parsed_response):
                  if i != j:
                      pair = (i, j)
                      rev_pair = (j, i)
                      if pair not in pairs and rev_pair not in pairs:
                          score = self.compute_similarity_score(unit, other_unit)
                          pairs.append(pair)
                          pairs.append(rev_pair)
                          all_scores.append(score)
          all_scores = [i for i in all_scores if i != self.same_word_similarity]
          self.measures["COLLECTION_" + self.current_similarity_measure + "_pairwise_similarity_score_mean"] = get_mean(
              all_scores) \
              if len(pairs) > 0 else 'NA'