code: def func1d(x):
      f = cos(14.5 * x - 0.3) + (x + 0.2) * x
      df = np.array(-14.5 * sin(14.5 * x - 0.3) + 2.0 * x + 0.2)
      return f, df
  
imports: from __future__ import division, print_function, absolute_import
  import copy
  from numpy.testing import assert_almost_equal, assert_equal, assert_
  from pytest import raises
  import numpy
  from numpy import cos, sin
  from scipy.optimize import basinhopping, OptimizeResult
  from scipy.optimize._basinhopping import Storage, RandomDisplacement, Metropolis, AdaptiveStepsize
label_desc: Use image node_id 1 for calling a global function with example usage: func1d(x) and returns: f,  df