code: def lstm_update(
      x: Union[tf.Tensor, tf.Variable],
      init_h: Union[tf.Tensor, tf.Variable],
      init_c: Union[tf.Tensor, tf.Variable],
      kernel: Union[tf.Tensor, tf.Variable],
      recurrent_kernel: Union[tf.Tensor, tf.Variable],
      /,
      *,
      bias: Optional[Union[tf.Tensor, tf.Variable]] = None,
      recurrent_bias: Optional[Union[tf.Tensor, tf.Variable]] = None,
      time_major: bool = False,
  ) -> Tuple[Tensor, Tuple[Tensor, Tensor]]:
      dev = x.device
      x = x.data
      init_h = init_h.data
      init_c = init_c.data
      kernel = kernel.data
      recurrent_kernel = recurrent_kernel.data
      bias = bias.data if bias is not None else bias
      recurrent_bias = (
          recurrent_bias.data
          if recurrent_bias is not None
          else recurrent_bias
      )
      if "cpu" in dev:
          outputs, new_states = _cpu_lstm(
              x,
              init_h,
              init_c,
              kernel,
              recurrent_kernel,
              bias,
              recurrent_bias,
              time_major,
          )
      else:
          outputs, new_states = _gpu_lstm(
              x,
              init_h,
              init_c,
              kernel,
              recurrent_kernel,
              bias,
              recurrent_bias,
              time_major,
          )
      return outputs, new_states
  
imports: from typing import Optional, Tuple, Union, Sequence
  import tensorflow
  from tensorflow.python.types.core import Tensor
  import ivy
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
  from .None import backend_version
  from ivy.functional.ivy.layers import _deconv_length, _get_x_data_format
label_desc: Use image node_id 19 for calling a global function with example usage: lstm_update() and returns: outputs,  new_states