def METHOD_NAME(self, roi):
    """
    Pad the given roi to obtain a new slicing to use for obtaining input data.
    Return the padded slicing and the slicing that returns the original roi within the padded data.
    """
    tags = self.InputImage.meta.axistags
    pairs = list(zip([tag.key for tag in tags], list(zip(roi.start, roi.stop))))
    slices = [(k, slice(start, stop)) for (k, (start, stop)) in pairs]
    # Compute the watershed over a larger area than requested (padded area)
    padding = self.PaddingWidth.value
    paddedSlices = []  # The requested slicing + padding
    outputSlices = []  # The slicing to get the requested slicing from the padded data
    for i, (key, s) in enumerate(slices):
        p = s
        if key in "xyz":
            p_start = max(s.start - padding, 0)
            p_stop = min(s.stop + padding, self.InputImage.meta.shape[i])
            p = slice(p_start, p_stop)
        paddedSlices += [p]
        o = slice(s.start - p.start, s.stop - p.start)
        outputSlices += [o]
    return tuple(paddedSlices), tuple(outputSlices)