code: def compute_ranks(x):
      """Returns ranks in [0, len(x))
  
      Note: This is different from scipy.stats.rankdata, which returns ranks in
      [1, len(x)].
      """
      assert x.ndim == 1
      ranks = np.empty(len(x), dtype=int)
      ranks[x.argsort()] = np.arange(len(x))
      return ranks
  
imports: import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: compute_ranks(x) and returns: ranks