code: def dropedge_both(
      A, iA, jA, features, threshold1=2.5, threshold2=0.01
  ):
      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]
              C1 = np.linalg.norm(features[n1] - features[n2])
  
              a, b = features[n1], features[n2]
              inner_product = (a * b).sum()
              C2 = inner_product / (
                  np.sqrt(np.square(a).sum() + np.square(b).sum())
                  + 1e-6
              )
              if C1 > threshold1 or threshold2 < 0:
                  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 4 for calling a global function with example usage: dropedge_both(A, iA, jA, features, threshold1, threshold2) and returns: removed_cnt