code: def __calculate_2d_same_padding(x, kx, dx, dilation_x):
      return int(
          ceil((x * (dx - 1) + dilation_x * (kx - 1) - dx + 1) / 2)
      )
  
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 4 for calling a global function with example usage: __calculate_2d_same_padding(x, kx, dx, dilation_x) and returns: int