code: def test_lstm_last_step_block():
      """perception test"""
      for dims in [[32, 16], [100, 32, 16], [100, 5, 32, 16]]:
          in_dict = build_input_dict(dims=dims)
  
          net = LSTMLastStepBlock(
              in_keys="in_key",
              out_keys="out_key",
              in_shapes=(32, 16),
              hidden_size=64,
              num_layers=1,
              bidirectional=True,
              non_lin=nn.ReLU,
          )
          str(net)
          out_dict = net(in_dict)
  
          assert isinstance(out_dict, Dict)
          assert net.out_shapes() == [out_dict["out_key"].shape[-1:]]
          assert list(out_dict["out_key"].shape[:-1]) == dims[:-2]
          assert out_dict["out_key"].ndim == len(dims) - 1
  
file_path: maze/maze/test/perception/blocks/test_joint.py
imports: from typing import Dict
  from torch import nn
  from maze.perception.blocks.joint_blocks.flatten_dense import FlattenDenseBlock
  from maze.perception.blocks.joint_blocks.lstm_last_step import LSTMLastStepBlock
  from maze.perception.blocks.joint_blocks.vgg_conv_dense import VGGConvolutionDenseBlock
  from maze.perception.blocks.joint_blocks.vgg_conv_gap import VGGConvolutionGAPBlock
  from maze.test.perception.perception_test_utils import build_input_dict
label_desc: Use image node_id 4 for calling a global function with example usage: test_lstm_last_step_block() without return types