def union_op(set1_embs, set1_sketch,
             set2_embs, set2_sketch
             ):
  """Compute union between two sets.

  Args:
    set1_embs: dense embeddings of set1.
    set1_sketch: sparse count-min sketch of set1.
    set2_embs: dense embeddings of set2.
    set2_sketch: sparse count-min sketch of set2.
  Returns:
    Set embeddings and sketches for unioned set.
  """
  union_embs = set1_embs + set2_embs
  union_sketch = tf.maximum(set1_sketch, set2_sketch)
  return union_embs, union_sketch
Compute union between two sets.

  Args:
    set1_embs: dense embeddings of set1.
    set1_sketch: sparse count-min sketch of set1.
    set2_embs: dense embeddings of set2.
    set2_sketch: sparse count-min sketch of set2.
  Returns:
    Set embeddings and sketches for unioned set.
  
language/emql/module.py