def parse_stage_config(stage_cfg):
    """Parse config of STPP for three stages.

    Args:
        stage_cfg (int | tuple[int]):
            Config of structured temporal pyramid pooling.

    Returns:
        tuple[tuple[int], int]:
            Config of structured temporal pyramid pooling and
            total number of parts(number of multipliers).
    """
    if isinstance(stage_cfg, int):
        return (stage_cfg, ), stage_cfg
    elif isinstance(stage_cfg, tuple):
        return stage_cfg, sum(stage_cfg)
    else:
        raise ValueError(f'Incorrect STPP config {stage_cfg}')