code: def _get_complex_tensor_from_tuple(x):
      if not isinstance(x, (tuple, list)) or len(x) != 2:
          raise ValueError(
              "Input `x` should be a tuple of two tensors - real and imaginary."
              f"Received: x={x}"
          )
      # `convert_to_tensor` does not support passing complex tensors. We separate
      # the input out into real and imaginary and convert them separately.
      real, imag = x
      # Check shapes.
      if real.shape != imag.shape:
          raise ValueError(
              "Input `x` should be a tuple of two tensors - real and imaginary."
              "Both the real and imaginary parts should have the same shape. "
              f"Received: x[0].shape = {real.shape}, x[1].shape = {imag.shape}"
          )
      # Ensure dtype is float.
      if not np.issubdtype(
          real.dtype, np.floating
      ) or not np.issubdtype(imag.dtype, np.floating):
          raise ValueError(
              "At least one tensor in input `x` is not of type float."
              f"Received: x={x}."
          )
      complex_input = real + 1j * imag
      return complex_input
  
imports: import numpy
  from keras.backend import standardize_dtype
  from keras.backend.jax.math import fft
  from keras.backend.jax.math import fft2
  from keras.backend.numpy.core import convert_to_tensor
  from keras.utils.module_utils import scipy
label_desc: Use image node_id 8 for calling a global function with example usage: _get_complex_tensor_from_tuple(x) and returns: complex_input