code: def sum_tensor(input, axes, keepdim=False):
      axes = np.unique(axes)
      if keepdim:
          for ax in axes:
              input = input.sum(ax, keepdim=True)
      else:
          for ax in sorted(axes, reverse=True):
              input = input.sum(int(ax))
      return input
  
imports: import numpy
  import scipy.misc
  import scipy.ndimage
  import torch
  from torch.autograd import Variable
  import torch.nn
label_desc: Use image node_id 26 for calling a global function with example usage: sum_tensor(input, axes, keepdim) and returns: input