code: def clsin(ctx, s, z, pi=False):
      if ctx.isint(s) and s < 0 and int(s) % 2 == 1:
          return z * 0
      if pi:
          a = ctx.expjpi(z)
      else:
          a = ctx.expj(z)
      if ctx._is_real_type(z) and ctx._is_real_type(s):
          return ctx.im(ctx.polylog(s, a))
      b = 1 / a
      return (-0.5j) * (ctx.polylog(s, a) - ctx.polylog(s, b))
  
imports: from __future__ import print_function
  from ..libmp.backend import xrange
  from .functions import defun, defun_wrapped, defun_static
label_desc: Use image node_id 19 for calling a global function with example usage: clsin(ctx, s, z, pi) and returns: unknown, unknown, ctx