code: def func2(x):
      return (
          x[0] ** 2
          + 0.5 * x[1] ** 2
          + 0.2 * x[2] ** 2
          + 0.2 * x[3] ** 2
      )
  
file_path: dipy/dipy/core/tests/test_optimize.py
imports: import numpy
  import scipy.sparse
  import numpy.testing
  from dipy.core.optimize import Optimizer, sparse_nnls, spdot
  import dipy.core.optimize
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 2 for calling a global function with example usage: func2(x) and returns: unknown