from typing import Sequence
from typing import Tuple
from typing import List


def group_bboxes_to_images(file_names: Sequence[str], bboxes: Sequence[Sequence[int]]) -> Tuple[List[str],
                                                                                                List[List[List[int]]]]:
    """
    Groups bounding boxes to images.
    
    Args:
        file_names: list of image file names
        bboxes: list of bounding boxes
    
    Returns:
        tuple of file names and corresponding lists of bounding boxes
    """
    return_labels = {}
    for file_name, bbox in zip(file_names, bboxes):
        if file_name not in return_labels:
            return_labels[file_name] = []
        return_labels[file_name].append(bbox)
    
    return list(return_labels.keys()), list(return_labels.values())