code: def dropedge_cosine(A, iA, jA, features, threshold):
      removed_cnt = 0
      for row in range(len(iA) - 1):
          for i in range(iA[row], iA[row + 1]):
              # print(row, jA[i], A[i])
              n1 = row
              n2 = jA[i]
              a, b = features[n1], features[n2]
              inner_product = (a * b).sum()
              C = inner_product / (
                  np.sqrt(np.square(a).sum())
                  * np.sqrt(np.square(b).sum())
                  + 1e-8
              )
  
              if C < threshold:
                  A[i] = 0
                  # A[n2, n1] = 0
                  removed_cnt += 1
      return removed_cnt
  
file_path: AutoGL/autogl/module/preprocessing/structure_engineering/_gcn_jaccard.py
imports: import scipy.sparse
  import numpy
  from numba import njit
  from .._data_preprocessor_registry import DataPreprocessorUniversalRegistry
  from ._structure_engineer import StructureEngineer, get_feature, get_edges, set_edges, to_adjacency_list, to_adjacency_matrix, LOGGER
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: dropedge_cosine(A, iA, jA, features, threshold) and returns: removed_cnt