code: def _to_complex(x):
      dtype = dtypes.complex64
      if x.dtype in [dtypes.float64, dtypes.complex128]:
          dtype = dtypes.complex128
      return _ops.cast(x, dtype)
  
imports: 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 numpy_array
  from tensorflow_probability.python.internal.backend.numpy import debugging
  from tensorflow_probability.python.internal.backend.numpy import numpy_math
  from tensorflow_probability.python.internal.backend.numpy import linalg_impl
  from tensorflow_probability.python.internal.backend.numpy.gen import linear_operator
  from tensorflow_probability.python.internal.backend.numpy.gen import linear_operator_circulant
  from tensorflow_probability.python.internal.backend.numpy.gen import linear_operator_util
  from tensorflow_probability.python.internal.backend.numpy import numpy_signal
  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 1 for calling a global function with example usage: _to_complex(x) and returns: _ops