code: def gini(v):
      # zero denotes total equality between rows,
      # and one denote the dominance of a single row.
      # v = np.sort(v) #values must be sorted
      index = np.arange(1, v.shape[0] + 1)  # index per v element
      n = v.shape[0]
      return (np.sum((2 * index - n - 1) * v)) / (n * np.sum(v))
  
file_path: cugraph/python/utils/analyse_mtx_sparsity.py
imports: import numpy
  import sys
  from scipy.io import mmread
  import scipy.sparse
  import networkx
  import matplotlib.pyplot
label_desc: Use image node_id 1 for calling a global function with example usage: gini(v) and returns: unknown