code: def check_dim(var, dim, name):
      if len(var.shape) != dim:
          raise ValueError("{} must be {}D".format(name, dim))
  
imports: import torch
  from torch.autograd import Function
  from torch.nn import Module
  from nemo.collections.asr.parts.numba.rnnt_loss import rnnt
  from nemo.collections.asr.parts.numba.rnnt_loss.utils.cpu_utils import cpu_rnnt
label_desc: Use image node_id 6 for calling a global function with example usage: check_dim(var, dim, name) without return types