code: def handle_odd_pad_bwd(dx, odd_padding):
      """
      handle odd padding mode backward
      Args:
          dx, the backward tensor
          odd_padding, the odd_padding
      Returns:
          tensor, the output
      """
      # (axis, left padding if True else right padding)
      flags = [(2, True), (2, False), (3, True), (3, False)]
      for (axis, left), pad in zip(flags, odd_padding):
          if pad == 0:
              continue
          axis_shape = list(dx.shape())[axis]
          if left:
              dx = singa.SliceOn(dx, pad, axis_shape, axis)
          else:
              dx = singa.SliceOn(dx, 0, axis_shape - pad, axis)
      return dx
  
file_path: singa/python/singa/utils.py
imports: import sys
  import numpy
  import collections
  from .None import singa_wrap
label_desc: Use image node_id 3 for calling a global function with example usage: handle_odd_pad_bwd(dx, odd_padding) and returns: dx