code: def scale(x):
      assert type(x) is list, "Input data to scale must be list"
      x_stacked = np.vstack(x)
      m1 = np.min(x_stacked)
      m2 = np.max(x_stacked - m1)
      f = lambda x: 2 * (np.divide(x - m1, m2)) - 1
      return [f(i) for i in x]
  
imports: import functools
  import sys
  import numpy
  import copy
  from scipy.interpolate import PchipInterpolator
  import seaborn
  import itertools
  import pandas
  from matplotlib.lines import Line2D
label_desc: Use image node_id 2 for calling a global function with example usage: scale(x) and returns: unknown