code: def _determine_padding(shape, block_size, m1, m2, m3, blockx, blocky):
      # TODO: can possibly revise to consider only particular factors for LCM on
      #       a given axis
      LCM = lcm(block_size, m1, m2, m3, blockx, blocky)
      orig_sz, orig_sy, orig_sx = shape
      round_up = False
      if orig_sx % LCM != 0:
          # round up size to a multiple of the band size
          round_up = True
          sx = LCM * math.ceil(orig_sx / LCM)
      else:
          sx = orig_sx
      if orig_sy % LCM != 0:
          # round up size to a multiple of the band size
          round_up = True
          sy = LCM * math.ceil(orig_sy / LCM)
      else:
          sy = orig_sy
      if orig_sz % LCM != 0:
          # round up size to a multiple of the band size
          round_up = True
          sz = LCM * math.ceil(orig_sz / LCM)
      else:
          sz = orig_sz
  
      aniso = not (sx == sy == sz)
      if aniso or round_up:
          smax = max(sz, sy, sx)
          padding_width = (
              (0, smax - orig_sz),
              (0, smax - orig_sy),
              (0, smax - orig_sx),
          )
      else:
          padding_width = None
      return padding_width
  
imports: import math
  import os
  import cupy
  import numpy
  from ._util import _get_inttype
  from ._pba_2d import _check_distances, _check_indices, _distance_tranform_arg_check, _generate_indices_ops, _generate_shape, _get_block_size, lcm
label_desc: Use image node_id 7 for calling a global function with example usage: _determine_padding(shape, block_size, m1, m2, m3, blockx, blocky) and returns: padding_width