code: def cosine_similarity(x, y, eps=1e-12):
      """
      Computes cosine similarity between two tensors.
      Value == 1 means the same vector
      Value == 0 means perpendicular vectors
      """
      x_n, y_n = np.linalg.norm(
          x, axis=1, keepdims=True
      ), np.linalg.norm(y, axis=1, keepdims=True)
      x_norm = x / np.maximum(x_n, eps * np.ones_like(x_n))
      y_norm = y / np.maximum(y_n, eps * np.ones_like(y_n))
      sim_mt = np.dot(x_norm, y_norm.T)
      return sim_mt
  
imports: from pptracking.python.mot.visualize import plot_tracking
  from python.visualize import visualize_attr
  import os
  import re
  import cv2
  import gc
  import numpy
  import pandas
  from tqdm import tqdm
  from functools import reduce
  import warnings
label_desc: Use image node_id 5 for calling a global function with example usage: cosine_similarity(x, y, eps) and returns: sim_mt