code: def test_fixedlength_unit(list_input):
      fixedlength = units.FixedLength(3)
      out = fixedlength.transform([])
      assert list(out) == [0] * 3
      out = fixedlength.transform(list_input)
      assert list(out) == ["36", "!", "input"]
      fixedlength = units.FixedLength(3, truncate_mode="post")
      out = fixedlength.transform(list_input)
      assert list(out) == ["this", "Is", "a"]
      fixedlength = units.FixedLength(
          12, pad_value="0", truncate_mode="pre", pad_mode="pre"
      )
      out = fixedlength.transform(list_input)
      assert list(out[3:]) == list_input
      assert list(out[:3]) == ["0"] * 3
      fixedlength = units.FixedLength(
          12, pad_value="0", truncate_mode="pre", pad_mode="post"
      )
      out = fixedlength.transform(list_input)
      assert list(out[:-3]) == list_input
      assert list(out[-3:]) == ["0"] * 3
  
imports: import pytest
  import numpy
  from matchzoo.preprocessors import units
  import matchzoo
  import tempfile
  import os
label_desc: Use image node_id 12 for calling a global function with example usage: test_fixedlength_unit(list_input) without return types