code: def test_encode_decode(input_str):
      mapping = """3K}7eé;5àÎYho]QwV6qU~W"XnbBvcADfËmy.9ÔpÛ*{CôïE%M4#ÈR:g@T$x?0î£|
          za1ù8,OG€P-kçHëÀÂ2É/ûIJ\'j(LNÙFut[)èZs+&°Sd=Ï!<â_Ç>rêi`l"""
      encoded = utils.encode_string(input_str, mapping)
      decoded = utils.decode_sequence(encoded, mapping)
      assert decoded == input_str
  
file_path: doctr/tests/common/test_datasets_utils.py
imports: import numpy
  import pytest
  from doctr.datasets import utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_encode_decode(input_str) without return types