code: def test_text_encode_decode():
      assert encode_text("abc") == b"\xFE\xFF\x00a\x00b\x00c"
      assert decode_text(b"\xFE\xFF\x00a\x00b\x00c") == "abc"
      assert decode_text(b"abc") == "abc"
      assert decode_text(b"\x1B a \x1C") == "\u02D9 a \u02DD"
  
file_path: pillow/Tests/test_pdfparser.py
imports: from __future__ import annotations
  import time
  import pytest
  from PIL.PdfParser import IndirectObjectDef, IndirectReference, PdfBinary, PdfDict, PdfFormatError, PdfName, PdfParser, PdfStream, decode_text, encode_text, pdf_repr
label_desc: Use image node_id 1 for calling a global function with example usage: test_text_encode_decode() without return types