def nested_list_elements_to_int(mask):
    """Recursively convert list of nested lists/tuples to list of nested lists with elements coerced to integers

    Args:
        mask (list): List with nested lists/tuples containing start, end positions

    Returns:
        (list): List of nested lists containing start, end positions, coerced to integers

    """
    if isinstance(mask, (list, tuple)):
        return list(map(nested_list_elements_to_int, mask))
    else:
        return int(mask)