code: def test_pad_sequence_to_length(self):
      assert util.pad_sequence_to_length([1, 2, 3], 5) == [
          1,
          2,
          3,
          0,
          0,
      ]
      assert util.pad_sequence_to_length(
          [1, 2, 3], 5, default_value=lambda: 2
      ) == [1, 2, 3, 2, 2]
      assert util.pad_sequence_to_length(
          [1, 2, 3], 5, padding_on_right=False
      ) == [0, 0, 1, 2, 3]
  
imports: from datetime import timedelta
  import sys
  from collections import OrderedDict
  import pytest
  import torch
  from allennlp.common import util
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.common.util import push_python_path
label_desc: Use image node_id 3 for calling the TestCommonUtils obj's underlying member method code with example usage: obj.test_pad_sequence_to_length() without return types