code: def drop_dissimilar_edges(
      features, adj, threshold, binary_feature=True, metric="similarity"
  ):
      """Drop dissimilar edges.(Faster version using numba)"""
      if not sp.issparse(adj):
          adj = sp.csr_matrix(adj)
  
      adj_triu = sp.triu(adj, format="csr")
  
      if sp.issparse(features):
          features = (
              features.todense().A
          )  # make it easier for njit processing
  
      if metric == "distance":
          removed_cnt = dropedge_dis(
              adj_triu.data,
              adj_triu.indptr,
              adj_triu.indices,
              features,
              threshold=threshold,
          )
      else:
          if binary_feature:
              removed_cnt = dropedge_jaccard(
                  adj_triu.data,
                  adj_triu.indptr,
                  adj_triu.indices,
                  features,
                  threshold=threshold,
              )
          else:
              removed_cnt = dropedge_cosine(
                  adj_triu.data,
                  adj_triu.indptr,
                  adj_triu.indices,
                  features,
                  threshold=threshold,
              )
      print("removed %s edges in the original graph" % removed_cnt)
      modified_adj = adj_triu + adj_triu.transpose()
      return modified_adj
  
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 5 for calling a global function with example usage: drop_dissimilar_edges(features, adj, threshold, binary_feature, metric) and returns: modified_adj