code: def to_bigdl_2d_padding(border_mode, *args):
      if border_mode == "same":
          if len(args) == 0:  # if -1 for same padding is supported
              return -1, -1
          # calculate padding by given parameters
          elif (
              len(args) == 4
          ):  # used by 1d layers constructed from 2d, just need one pad
              h, kh, dh, dilation_h = args
              pad_h = __calculate_2d_same_padding(h, kh, dh, dilation_h)
              return pad_h, 0
          elif len(args) == 8:
              h, kh, dh, dilation_h, w, kw, dw, dilation_w = args
              pad_h = __calculate_2d_same_padding(h, kh, dh, dilation_h)
              pad_w = __calculate_2d_same_padding(w, kw, dw, dilation_w)
              return pad_h, pad_w
      elif border_mode == "valid":
          return 0, 0
      else:
          invalidInputError(
              False, "Unsupported border mode: %s" % border_mode
          )
  
file_path: BigDL/python/dllib/src/bigdl/dllib/keras/ToBigDLHelper.py
imports: from math import ceil
  import bigdl.dllib.nn.initialization_method
  from bigdl.dllib.utils.log4Error import *
  from bigdl.dllib.optim.optimizer import L1L2Regularizer
label_desc: Use image node_id 5 for calling a global function with example usage: to_bigdl_2d_padding(border_mode) and returns: unknown,  unknown, int,  int, pad_h,  int, pad_h,  pad_w