code: def iscomplex(tensor, like=None):
      """Return True if the tensor has a non-zero complex component."""
      if like == "tensorflow":
          import tensorflow as tf
  
          imag_tensor = tf.math.imag(tensor)
          return tf.math.count_nonzero(imag_tensor) > 0
  
      if like == "torch":
          import torch
  
          if torch.is_complex(tensor):
              imag_tensor = torch.imag(tensor)
              return torch.count_nonzero(imag_tensor) > 0
          return False
  
      return np.iscomplex(tensor)
  
imports: import functools
  from collections.abc import Sequence
  import autoray
  import numpy
  from autograd.numpy.numpy_boxes import ArrayBox
  from autoray import numpy
  from numpy import ndarray
  from .None import single_dispatch
  from .utils import cast, cast_like, get_interface, requires_grad
label_desc: Use image node_id 21 for calling a global function with example usage: iscomplex(tensor, like) and returns: np, unknown, False, unknown