code: def test_invalid_bidirectional_lstm(self):
      with pytest.raises(
          ValueError,
          match="For bidirectional LSTM, the `weight_ih_back` and "
          "`weight_hh_back` must be provided.",
      ):
          seq_len = 3
          batch = 2
          input_size = 4
          hidden_size = 5
          mb.lstm(
              x=np.random.rand(seq_len, batch, input_size),
              initial_h=np.zeros((batch, hidden_size)).astype(
                  np.float32
              ),
              initial_c=np.zeros((batch, hidden_size)).astype(
                  np.float32
              ),
              weight_ih=np.random.rand(4 * hidden_size, input_size),
              weight_hh=np.random.rand(4 * hidden_size, hidden_size),
              direction="bidirectional",
          )
  
imports: import itertools
  import numpy
  import pytest
  import coremltools
  from coremltools._deps import _HAS_TORCH, MSG_TORCH_NOT_FOUND
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import get_new_symbol
  from coremltools.converters.mil.mil.ops.tests.iOS14 import backends
  from coremltools.converters.mil.mil.ops.tests.testing_utils import construct_inputs_from_placeholders, run_compare_builder
  from coremltools.converters.mil.mil.types.type_mapping import numpy_type_to_builtin_type
  from coremltools.converters.mil.testing_reqs import compute_units
  from coremltools.converters.mil.testing_utils import ssa_fn
label_desc: Use image node_id 4 for calling the TestLSTM obj's underlying member method code with example usage: obj.test_invalid_bidirectional_lstm() without return types