def METHOD_NAME(input_spatial_resolution, kernel_size, stride,
                               total_padding):
  """Computes output resolution, given input resolution and layer parameters.
  Note that this computation is done only over one dimension (eg, x or y).
  If any of the inputs is None, returns None.
  Args:
    input_spatial_resolution: Input spatial resolution (int).
    kernel_size: Kernel size (int).
    stride: Stride (int).
    total_padding: Total padding to be applied (int).
  Returns:
    output_resolution: Output dimension (int) or None.
  """
  if (input_spatial_resolution is None) or (kernel_size is None) or (
      stride is None) or (total_padding is None):
    return None
  return int(
      math.ceil((
          input_spatial_resolution + total_padding - kernel_size + 1) / stride))