code: def handle_odd_pad_fwd(x, odd_padding, is_pool=False):
      """
      handle odd padding mode forward
      Args:
          x, the input 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
          if is_pool:
              if left:
                  padding = singa.SliceOn(x, 0, pad, axis)
              else:
                  axis_shape = list(x.shape())[axis]
                  padding = singa.SliceOn(
                      x, axis_shape - pad, axis_shape, axis
                  )
          else:
              pad_shape = list(x.shape())
              pad_shape[axis] = pad
              padding = singa.Tensor(list(pad_shape), x.device())
              padding.SetFloatValue(0.0)
          if left:
              x = singa.ConcatOn(singa.VecTensor([padding, x]), axis)
          else:
              x = singa.ConcatOn(singa.VecTensor([x, padding]), axis)
      return x
  
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 2 for calling a global function with example usage: handle_odd_pad_fwd(x, odd_padding, is_pool) and returns: x