code: def test_complex():
      def func(z):
          return z**2 - 1 + 2j
  
      x0 = 2.0j
  
      ftol = 1e-4
      sol = root(func, x0, tol=ftol, method="DF-SANE")
  
      assert_(sol.success)
  
      f0 = np.linalg.norm(func(x0))
      fx = np.linalg.norm(func(sol.x))
      assert_(fx <= ftol * f0)
  
imports: from __future__ import division, absolute_import, print_function
  import itertools
  import numpy
  from numpy import exp
  from numpy.testing import assert_, assert_equal
  from scipy.optimize import root
label_desc: Use image node_id 2 for calling a global function with example usage: test_complex() and returns: unknown