docstr: 检查张量是否在cpu上的工具函数
docstr_tok: ["\u68c0\u67e5\u5f20\u91cf\u662f\u5426\u5728cpu\u4e0a\u7684\u5de5\u5177\u51fd\u6570"]
code: def check_cpu(self, tensor):
      """
      检查张量是否在cpu上的工具函数
      """
  
      assert tensor.place.is_cpu_place()
  
file_path: fastNLP/tests/core/utils/test_paddle_utils.py
imports: import os
  import pytest
  from fastNLP.core.utils.paddle_utils import _convert_data_device, paddle_to, paddle_move_data_to_device
  from fastNLP.envs.imports import _NEED_IMPORT_PADDLE
label_desc: Use image node_id 2 for calling the TestPaddleMoveDataToDevice obj's underlying member method code with example usage: obj.check_cpu(tensor) without return types