code: def assert_zero_imag_part(
      x, message=None, name="assert_zero_imag_part"
  ):
      """Returns `Op` that asserts Tensor `x` has no non-zero imaginary parts.
  
      Args:
        x:  Numeric `Tensor`, real, integer, or complex.
        message:  A string message to prepend to failure message.
        name:  A name to give this `Op`.
  
      Returns:
        An `Op` that asserts `x` has no entries with modulus zero.
      """
      with ops.name_scope(name, values=[x]):
          x = ops.convert_to_tensor(x, name="x")
          dtype = x.dtype
  
          if np.issubdtype(dtype, np.floating):
              return control_flow_ops.no_op()
  
          zero = ops.convert_to_tensor(
              0, dtype=dtypes.real_dtype(dtype)
          )
          return check_ops.assert_equal(
              zero, math_ops.imag(x), message=message
          )
  
imports: import numpy
  from tensorflow_probability.python.internal.backend.numpy import dtype
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy import numpy_array
  from tensorflow_probability.python.internal.backend.numpy import debugging
  from tensorflow_probability.python.internal.backend.numpy import control_flow
  from tensorflow_probability.python.internal.backend.numpy import linalg_impl
  from tensorflow_probability.python.internal.backend.numpy import numpy_math
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy import nest
  import numpy
  from tensorflow_probability.python.internal.backend.numpy import linalg_impl
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy.gen import tensor_shape
  from tensorflow_probability.python.internal.backend.numpy import private
label_desc: Use image node_id 8 for calling a global function with example usage: assert_zero_imag_part(x, message, name) and returns: check_ops, control_flow_ops