code: def num_edges(matrix):
      """Computes number of edges in adjacency matrix."""
      return np.sum(matrix)
  
file_path: singa/examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/src/third_pkg/sp101_lib/graph_util.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import hashlib
  import itertools
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: num_edges(matrix) and returns: np