code: def test_invalid_truncate_direction(self, encodings):
      single, _ = encodings
      with pytest.raises(ValueError) as excinfo:
          single.truncate(2, 1, "not_a_direction")
      assert (
          "Invalid truncation direction value : not_a_direction"
          == str(excinfo.value)
      )
  
file_path: hf-tokenizers/bindings/python/tests/bindings/test_encoding.py
imports: import pytest
  from tokenizers import BertWordPieceTokenizer
  from ..utils import bert_files, data_dir
label_desc: Use image node_id 12 for calling the TestEncoding obj's underlying member method code with example usage: obj.test_invalid_truncate_direction(encodings) without return types