code: def isnan(tensor):
      return np.isnan(tensor.cpu().data.numpy()).sum() > 0
  
imports: import numpy
  import collections
  import torch
  from torch import nn
  import torch.nn.functional
  from torch.autograd import Variable
  import models.shared_base
  import utils
label_desc: Use image node_id 2 for calling a global function with example usage: isnan(tensor) and returns: unknown