code: def test_sequence_length_2D(
      input_sequence: List[List[int]], expected_output: List[int]
  ):
      output_seq_length = sequence_length_2D(
          torch.tensor(input_sequence)
      )
      assert torch.equal(
          torch.tensor(expected_output), output_seq_length
      )
  
file_path: ludwig/tests/ludwig/utils/test_torch_utils.py
imports: import contextlib
  import os
  from typing import List
  from unittest.mock import patch
  import pytest
  import torch
  from ludwig.utils.torch_utils import _get_torch_init_params, _set_torch_init_params, initialize_pytorch, sequence_length_2D, sequence_length_3D
label_desc: Use image node_id 1 for calling a global function with example usage: test_sequence_length_2D(input_sequence, expected_output) without return types