def METHOD_NAME(self, inputs):
    if self.data_format == "channels_first":
        all_dims_padding = ((0, 0), (0, 0), *self.padding)
    else:
        all_dims_padding = ((0, 0), *self.padding, (0, 0))
    return ops.pad(inputs, all_dims_padding)