code: def trace_args(func):
      def tofloat(x):
          if isinstance(x, mpmath.mpc):
              return complex(x)
          else:
              return float(x)
  
      def wrap(*a, **kw):
          sys.stderr.write("%r: " % (tuple(map(tofloat, a)),))
          sys.stderr.flush()
          try:
              r = func(*a, **kw)
              sys.stderr.write("-> %r" % r)
          finally:
              sys.stderr.write("\n")
              sys.stderr.flush()
          return r
  
      return wrap
  
imports: import os
  import sys
  import time
  import numpy
  from numpy.testing import assert_
  import pytest
  from scipy.special._testutils import assert_func_equal
label_desc: Use image node_id 6 for calling a global function with example usage: trace_args(func) and returns: wrap, r, complex, float