code: def truncate(self, id1, id2, seqlen):
      len1 = len(id1)
      len2 = len(id2)
      half = seqlen // 2
      if len1 > len2:
          len1_truncated, len2_truncated = max(
              half, seqlen - len2
          ), min(half, len2)
      else:
          len1_truncated, len2_truncated = min(
              half, seqlen - len1
          ), max(half, seqlen - len1)
      return id1[:len1_truncated], id2[:len2_truncated]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import logging
  import os
  import re
  import sys
  import tempfile
  from functools import partial
  from pathlib import Path
  import six
  from tqdm import tqdm
  import numpy
  from disco_diffusion_ernievil_base.vit_b_16x.ernievil2.transformers.file_utils import _fetch_from_remote
  import io
label_desc: Use image node_id 5 for calling the ErnieTokenizer obj's underlying member method code with example usage: obj.truncate(id1, id2, seqlen) and returns: id1,  id2