code: def stretch_neg1_to_1(vec):
      a = np.copy(vec)
      if sum(a < 0):
          a[a < 0] = -a[a < 0] * 1.0 / a[a < 0].min()
      if sum(a > 0):
          a[a > 0] = a[a > 0] * 1.0 / a[a > 0].max()
      return a
  
imports: from typing import Callable
  import numpy
  import pandas
  from scipy.stats import rankdata
label_desc: Use image node_id 27 for calling a global function with example usage: stretch_neg1_to_1(vec) and returns: a