code: def bidirectional(
      l2r: Model[InT, OutT], r2l: Optional[Model[InT, OutT]] = None
  ) -> Model[InT, OutT]:
      """Stitch two RNN models into a bidirectional layer. Expects squared sequences."""
      if r2l is None:
          r2l = l2r.copy()
      return Model(
          f"bi{l2r.name}", forward, layers=[l2r, r2l], init=init
      )
  
file_path: thinc/thinc/layers/bidirectional.py
imports: from typing import Callable, Optional, Tuple, cast
  from ..backends import Ops
  from ..config import registry
  from ..model import Model
  from ..types import Padded
label_desc: Use image node_id 1 for calling a global function with example usage: bidirectional(l2r, r2l) and returns: Model