def context_mod_args(parser, dsparsification_reg_type='l1', 
        dsparsification_reg_strength=1., dcontext_mod_init='constant'):
    """This is a helper function of function :func:`parse_cmd_arguments` to add
    an argument group for options regarding the context modulation.

    Arguments specified in this function:
        - `use_context_mod`
        - `no_context_mod_outputs`
        - `context_mod_inputs`
        - `context_mod_post_activation`
        - `context_mod_last_step`
        - `checkpoint_context_mod`
        - `offset_gains`
        - `dont_softplus_gains`
        - `sparsify_context_mod`
        - `sparsification_reg_strength`

    Args:
        parser: Object of class :class:`argparse.ArgumentParser`.
        dsparsification_reg_type (str): Default value of option 
            `sparsification_reg_type`.
        dsparsification_reg_strength (float): Default value of option
            `sparsification_reg_strength`.
        dcontext_mod_init (str): Default value of option `context_mod_init`.

    Returns:
        The created argument group, in case more options should be added.
    """

    heading = 'Context modulation options'
    agroup = parser.add_argument_group(heading)

    # here we dont differenciate between the usage of hnet and context mod
    # since we assume we only use the cm case
    agroup.add_argument('--use_context_mod', action='store_true',
                        help='If True, hnet-based context-mod will be used.')
    agroup.add_argument('--no_context_mod_outputs', action='store_true',
                        help='If True, context modulation will not be ' +
                             'applied to the output layer.')
    agroup.add_argument('--context_mod_inputs', action='store_true',
                        help='If True, context modulation will be applied ' +
                             'to the input layer.')
    agroup.add_argument('--context_mod_post_activation', action='store_true',
                        help='If True, context modulation will be applied ' +
                             'after computing the activation function, ' +
                             'else, it will be applied before.')
    agroup.add_argument('--context_mod_last_step', action='store_true',
                        help='If True, context modulation will only be ' +
                             'applied in the last timestep of the sequence. ' +
                             'Else, it is applied at every timestep.')
    agroup.add_argument('--checkpoint_context_mod', action='store_true',
                        help='Train context-modulation without a ' +
                             'hypernetwork. Instead, context-mod weights ' +
                             'will be part of the main network and will be ' +
                             'checkpointed after every task (linear memory ' +
                             'growth).')
    agroup.add_argument('--context_mod_init', type=str,
                        default=dcontext_mod_init,
                        help='What method to use to initialize context-' +
                             'modulation weights. Note, this option is only ' +
                             'applicable in combination with ' +
                             '"checkpoint_context_mod". Reinitialization ' +
                             'will be performed after every task. If ' +
                             '"sparse" is used, then the option ' +
                             '"mask_fraction" is reused to determine the ' +
                             'sparsity level. Default: %(default)s.',
                        choices=['constant', 'normal', 'uniform', 'sparse'])
    agroup.add_argument('--offset_gains', action='store_true',
                        help='If this option is activated, the modulatory ' +
                             'gains produced by the hypernetwork will be ' +
                             'shifted by 1. Note, requires ' +
                             '"dont_softplus_gain" to be set.')
    agroup.add_argument('--dont_softplus_gains', action='store_true',
                        help='If this option is activated, the modulatory ' +
                             'gains produced by the hypernetwork will not ' +
                             'be send through a softplus. Therefore, they ' +
                             'might be positive and negative.')
    agroup.add_argument('--context_mod_per_ts', action='store_true',
                        help='If True, a different context-mod pattern per ' +
                             'timestep will be learned.')
    agroup.add_argument('--sparsify_context_mod', action='store_true',
                        help='If this option is activated, the modulatory ' +
                             'gains are pushed towards zero to sparsify the ' +
                             'backpropagation through neurons in order to ' +
                             'restrict the absolute model capacity used per ' +
                             'task as well to ensure that there are ' +
                             '"unimportant" weights reserved for future tasks.')
    agroup.add_argument('--sparsification_reg_strength', type=float,
                        default=dsparsification_reg_strength,
                        help='The strength of the gain sparsification ' +
                             'regularizer. Default: %(default)s.')
    agroup.add_argument('--sparsification_reg_type', type=str,
                        default=dsparsification_reg_type,
                        help='The type of regularizer to be used in order to ' +
                             'obtain sparse gain patterns. ' +
                             'Default: %(default)s.',
                        choices=['l1', 'log'])

    return agroup