code: def assert_no_grad(variable):
      if variable.requires_grad:
          raise ValueError(
              "nn criterions don't compute the gradient w.r.t. targets - please "
              "mark these variables as volatile or not requiring gradients"
          )
  
imports: import numpy
  import torch
label_desc: Use image node_id 5 for calling a global function with example usage: assert_no_grad(variable) without return types