code: def _W_ih_l(
      layer_i: int,
      input_size: int,
      hidden_size: int,
      bidirectional: bool,
  ) -> Shape:
      """Shape of W_ii|W_if|W_ig|W_io.
  
      Note that layer_i is an index of pseudo-layers.
      """
      if layer_i == 0 or (layer_i == 1 and bidirectional):
          return (4 * hidden_size, input_size)
      else:
          num_directions = 2 if bidirectional else 1
          return (4 * hidden_size, num_directions * hidden_size)
  
imports: from functools import partial
  import math
  from typing import Any
  import jax
  import numpy
  from jax._src import core
  from jax.interpreters import mlir
  from jax.interpreters import xla
  from jax._src.custom_derivatives import custom_vjp
  from jax._src.typing import Array, Shape
  from jax._src.lax import lax
  import jax.numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _W_ih_l(layer_i, input_size, hidden_size, bidirectional) and returns: unknown,  input_size, unknown,  unknown