code: def _cospi_complex(z):
      if z.real < 0:
          z = -z
      n, r = divmod(z.real, 0.5)
      z = pi * complex(r, z.imag)
      n %= 4
      if n == 0:
          return cmath.cos(z)
      if n == 1:
          return -cmath.sin(z)
      if n == 2:
          return -cmath.cos(z)
      if n == 3:
          return cmath.sin(z)
  
imports: import operator
  import math
  import cmath
label_desc: Use image node_id 8 for calling a global function with example usage: _cospi_complex(z) and returns: cmath, unknown, unknown, cmath