code: def _to_complex(x):
      dtype = dtypes.complex64
      if x.dtype in [dtypes.float64, dtypes.complex128]:
          dtype = dtypes.complex128
      return math_ops.cast(x, dtype)
  
imports: from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_conversion
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.linalg import linalg_impl
  from tensorflow.python.ops.linalg import linear_operator
  from tensorflow.python.ops.linalg import linear_operator_circulant
  from tensorflow.python.ops.linalg import linear_operator_util
  from tensorflow.python.ops.signal import fft_ops
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 for calling a global function with example usage: _to_complex(x) and returns: math_ops