def return_slice(axis, index):
    """Prepares a slice tuple to use for extracting a slice for rendering

    Args:
        axis (str): One of "x", "y" or "z"
        index (int): The index of the slice to fetch

    Returns:
        tuple: can be used to extract a slice
    """

    if axis == "x":
        return (slice(None), slice(None), index)
    if axis == "y":
        return (slice(None), index, slice(None))
    if axis == "z":
        return (index, slice(None), slice(None))

    return None