class_docstr: Computes the similarity graph from a set of (dense) embeddings.
docstr: Returns `True` iff the edge `src` to `tgt` has not been generated yet.
docstr_tok: ["Returns","`","True","`","iff","the","edge","`","src","`","to","`","tgt","`","has","not","been","generated","yet","."]
code: def _is_new_edge(self, src, tgt):
      """Returns `True` iff the edge `src` to `tgt` has not been generated yet."""
      canonical_edge = (src, tgt) if src < tgt else (tgt, src)
      # Remember set size before calling add() because add() returns None.
      # This way we don't have to hash 'canonical_edge' twice.
      set_size_before_add = len(self.edge_set)
      self.edge_set.add(canonical_edge)
      return len(self.edge_set) > set_size_before_add
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  import time
  from absl import app
  from absl import flags
  from absl import logging
  import neural_structured_learning.configs
  import numpy
  import six
  import tensorflow
label_desc: Use image node_id 2 for calling the GraphBuilder obj's underlying member method code with example usage: obj._is_new_edge(src, tgt) and returns: unknown