docstr: 检查得到的Jittor Var梯度情况的工具函数
docstr_tok: ["\u68c0\u67e5\u5f97\u5230\u7684Jittor","Var\u68af\u5ea6\u60c5\u51b5\u7684\u5de5\u5177\u51fd\u6570"]
code: def check_jittor_var(self, var, requires_grad):
      """
      检查得到的Jittor Var梯度情况的工具函数
      """
  
      assert isinstance(var, jittor.Var)
      assert var.requires_grad == requires_grad
  
imports: import pytest
  from fastNLP.envs.imports import _NEED_IMPORT_JITTOR, _NEED_IMPORT_PADDLE, _NEED_IMPORT_TORCH
  from fastNLP.modules.mix_modules.utils import paddle2torch, torch2paddle, jittor2torch, torch2jittor
label_desc: Use image node_id 1 for calling the TestTorch2Jittor obj's underlying member method code with example usage: obj.check_jittor_var(var, requires_grad) without return types