def replay_args(parser, show_all_task_softmax=True):
    """This is a helper function of function :func:`parse_cmd_arguments` to add
    an argument group for options regarding Generative Replay.

    Args:
        parser (argparse.ArgumentParser): The argument parser to which the
            group should be added.
        show_all_task_softmax (bool): Whether option `all_task_softmax` should
            be shown.

            Note:
                Only sensible for classification tasks.

    Returns:
        The created argument group, in case more options should be added.
    """
    agroup = parser.add_argument_group('Replay options')

    agroup.add_argument('--use_replay', action='store_true',
                         help='Whether generative replay should be used as a ' +
                              'method to prevent catastrophic forgetting. ' +
                              'If option "hnet_all" is enabled, a replay ' +
                              'model per task is learned within one task-' +
                              'conditioned hypernetwork. Otherwise, ' +
                              'forgetting within the replay model is ' +
                              'prevented by replaying data from a ' +
                              'checkpointed replay model before starting to ' +
                              'learn a new task.')
    if show_all_task_softmax:
        # This enables what we call CL3.
        agroup.add_argument('--all_task_softmax', action='store_true',
                             help='If enabled, the replay model is used to ' +
                                  'train a multi-head classifier whose ' +
                                  'softmax predictions are computed across ' +
                                  'all output heads.')
    agroup.add_argument('--replay_pm_strength', type=float, default=1.,
                        help='The strength of the prior-matching term if ' +
                             'replay is used. Default: %(default)s.')
    agroup.add_argument('--replay_rec_strength', type=float, default=1.,
                        help='The strength of the reconstruction term if ' +
                             'replay is used. Default: %(default)s.')
    agroup.add_argument('--replay_distill_reg', type=float, default=1.,
                        help='The strength of the soft-target distillation ' +
                             'loss if replay is used. Default: %(default)s.')
    agroup.add_argument('--replay_true_data', action='store_true',
                         help='This is a sanity check. If enabled, actual ' +
                              'data from previous tasks will be replayed. ' +
                              'The autoencoder is still trained, even though ' +
                              'the decoder has no influence in training the ' +
                              'target model.')
    agroup.add_argument('--coreset_size', type=int, default=-1, metavar='N',
                        help='This option is only valid in combination with ' +
                             'option "use_replay". If "-1", then coresets ' +
                             'are deactivated. Otherwise, a positive integer ' +
                             'is expected denoting the size of a coreset per ' +
                             'task. In this case, no decoder (VAE) will be ' +
                             'trained. Instead, data from the coreset is ' +
                             'replayed. Default: %(default)s.')

    return agroup