code: def get_angular_sim(emb1, emb2):
      """Returns the _angular_ similarity between a batch of vector and a batch
      of vectors."""
      cos_sim = torch.nn.CosineSimilarity(dim=1)(emb1, emb2)
      return 1 - (torch.acos(cos_sim) / math.pi)
  
file_path: TextAttack/textattack/constraints/semantics/sentence_encoders/sentence_encoder.py
imports: from abc import ABC
  import math
  import numpy
  import torch
  from textattack.constraints import Constraint
label_desc: Use image node_id 1 for calling a global function with example usage: get_angular_sim(emb1, emb2) and returns: unknown