code: def _check_tensor_is_scalar(var):
      """
      Checks if a tensor variable is scalar, raise ValueError otherwise
      """
      msg = "%(var)s is expected to be 0d tensor, got %(ndim)d"
      if var.ndim != 0:
          raise ValueError(msg % (var, var.ndim))
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import theano
  from theano.tensor.basic import mul, arange
  from theano.gradient import grad_undefined
  from theano.tensor.subtensor import set_subtensor
label_desc: Use image node_id 2 for calling a global function with example usage: _check_tensor_is_scalar(var) without return types