code: def re_new_handle(handle, x, is_pool=False):
      """
      re-new a handle by useing the new input tensor
      Args:
          handle, the handle
          x, input tensor
      Returns:
          handle, a new handle
      """
      kernel_size = [handle.kernel_h, handle.kernel_w]
      stride = [handle.stride_h, handle.stride_w]
      padding = [handle.pad_h, handle.pad_w]
      if is_pool:
          params = (
              x,
              kernel_size,
              stride,
              padding,
              handle.is_max_pooling,
          )
      else:
          params = (
              x,
              kernel_size,
              stride,
              padding,
              handle.channels,
              handle.num_filters,
              handle.bias_term,
              handle.group,
          )
      if (
          type(handle) == singa.ConvHandle
          or type(handle) == singa.PoolingHandle
      ):
          handle = (
              singa.PoolingHandle(*params)
              if is_pool
              else singa.ConvHandle(*params)
          )
      else:
          handle = (
              singa.CudnnPoolingHandle(*params)
              if is_pool
              else singa.CudnnConvHandle(*params)
          )
      return handle
  
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 5 for calling a global function with example usage: re_new_handle(handle, x, is_pool) and returns: handle