def METHOD_NAME(
    modules: List[Type[ModuleBase]],
) -> Dict[Type[TaskBase], List[CaikitMethodSignature]]:
    task_groups = {}
    for ck_module in modules:
        if ck_module.TASK_CLASS:
            ck_module_task_name = ck_module.TASK_CLASS.__name__
            if ck_module_task_name is not None:
                for (
                    input_streaming,
                    output_streaming,
                    signature,
                ) in ck_module._INFERENCE_SIGNATURES:
                    task_groups.setdefault(ck_module.TASK_CLASS, {}).setdefault(
                        (input_streaming, output_streaming), []
                    ).append(signature)
    return task_groups