code: def test_compare_tuple():
      from fastNLP.core.collators.collator import _compare_tuple
  
      for t1, t2, t in zip(
          [(1,), (1, 2, 3), (1,), (1, 2)],
          [(1, 2, 3), (1,), (2,), (1, 3)],
          [-2, 2, None, None],
      ):
          assert _compare_tuple(t1, t2) == t
  
imports: import numpy
  import pytest
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH, _NEED_IMPORT_PADDLE, _NEED_IMPORT_JITTOR, _NEED_IMPORT_ONEFLOW
  from fastNLP.core.collators.collator import Collator
  from ...helpers.utils import Capturing
label_desc: Use image node_id 6 for calling a global function with example usage: test_compare_tuple() without return types