def METHOD_NAME(
    self,
    csv_row_dict: Dict[str, Union[str, int]],
    image_dir: Path,
    seg_path: Optional[Path],
    boxes: TypeBoxes,
) -> Subject:
    subject_dict: Dict[str, Any] = {}
    subject_dict.update(csv_row_dict)
    subject_dict['ct'] = ScalarImage(image_dir)
    if seg_path is not None:
        subject_dict['seg'] = LabelMap(seg_path)
    if boxes:
        subject_dict['boxes'] = boxes
    return Subject(**subject_dict)