code: def test_LSTM_init_with_sizes(ops, nO, nI):
      model = with_padded(LSTM(nO, nI, depth=1)).initialize()
      for node in model.walk():
          model.ops = ops
          # Check no unallocated params.
          assert node.has_param("LSTM") is not None
          assert node.has_param("HC0") is not None
      for node in model.walk():
          # Check param sizes.
          if node.has_param("LSTM"):
              params = node.get_param("LSTM")
              assert params.shape == (
                  ((nO * 4 * nI)) + (nO * 4) + (nO * 4 * nO + nO * 4),
              )
          if node.has_param("HC0"):
              params = node.get_param("HC0")
              assert params.shape == (2, 1, 1, nO)
  
file_path: thinc/thinc/tests/layers/test_lstm.py
imports: import timeit
  import numpy
  import pytest
  from thinc.api import LSTM, NumpyOps, Ops, PyTorchLSTM, fix_random_seed, with_padded
  from thinc.compat import has_torch
label_desc: Use image node_id 4 for calling a global function with example usage: test_LSTM_init_with_sizes(ops, nO, nI) without return types