code: def _test_pad_val(tensor, val=0):
      if isinstance(tensor, torch.Tensor):
          tensor = tensor.tolist()
      for item in tensor:
          if item[-1] > 0:
              continue
          elif item[-1] != val:
              return False
      return True
  
file_path: fastNLP/tests/core/dataloaders/torch_dataloader/test_mixdataloader.py
imports: import pytest
  from typing import Mapping
  from fastNLP.core.dataloaders import MixDataLoader
  from fastNLP import DataSet
  from fastNLP.core.collators import Collator
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
label_desc: Use image node_id 1 for calling a global function with example usage: _test_pad_val(tensor, val) and returns: True, False