def add_parameter(self, **kwargs):
parameter_name = max(kwargs['<STR_LIT>'], key = len).lstrip('<STR_LIT:->')<EOL>if '<STR_LIT>' in kwargs:<EOL><INDENT>parameter_name = kwargs['<STR_LIT>']<EOL><DEDENT>group = kwargs.pop('<STR_LIT>', '<STR_LIT:default>')<EOL>self.groups.add(group)<EOL>parameter_name = '<STR_LIT:.>'.join([ group, parameter_name ]).lstrip('<STR_LIT:.>').replace('<STR_LIT:->', '<STR_LIT:_>')<EOL>logger.info('<STR_LIT>', parameter_name)<EOL>if self.parsed:<EOL><INDENT>logger.warn('<STR_LIT>', parameter_name)<EOL>warnings.warn('<STR_LIT>'.format(parameter_name), RuntimeWarning)<EOL><DEDENT>self.parameters[parameter_name] = copy.copy(kwargs)<EOL>self.parameters[parameter_name]['<STR_LIT>'] = group<EOL>self.parameters[parameter_name]['<STR_LIT:type>'] = kwargs.get('<STR_LIT:type>', str)<EOL>self.parameters[parameter_name]['<STR_LIT>'] = kwargs.pop('<STR_LIT>', os.path.basename(sys.argv[<NUM_LIT:0>]))<EOL>if self.parameters[parameter_name]['<STR_LIT>'] is not None:<EOL><INDENT>self.parameters[parameter_name]['<STR_LIT>'] = self.parameters[parameter_name]['<STR_LIT>'].upper().replace('<STR_LIT:->', '<STR_LIT:_>')<EOL><DEDENT>logger.info('<STR_LIT>', group)<EOL>self.grouped_parameters.setdefault(group, {}).setdefault(parameter_name.replace(group + '<STR_LIT:.>', '<STR_LIT>'), self.parameters[parameter_name])<EOL>action_defaults = {<EOL>'<STR_LIT:store>': kwargs.get('<STR_LIT:default>'),<EOL>'<STR_LIT>': kwargs.get('<STR_LIT>'),<EOL>'<STR_LIT:store_true>': False,<EOL>'<STR_LIT>': True,<EOL>'<STR_LIT>': [],<EOL>'<STR_LIT>': [],<EOL>'<STR_LIT:count>': <NUM_LIT:0>,<EOL>}<EOL>self.defaults[parameter_name] = action_defaults[kwargs.get('<STR_LIT:action>', '<STR_LIT:store>')]<EOL>logger.info('<STR_LIT>', kwargs.get('<STR_LIT:default>'))<EOL>if '<STR_LIT>' in kwargs.pop('<STR_LIT>', [ '<STR_LIT>' ]):<EOL><INDENT>if group not in self._group_parsers:<EOL><INDENT>self._group_parsers[group] = self._group_parsers['<STR_LIT:default>'].add_argument_group(group)<EOL><DEDENT>if self._group_prefix and group != '<STR_LIT:default>':<EOL><INDENT>long_option = max(kwargs['<STR_LIT>'], key = len)<EOL>kwargs['<STR_LIT>'].remove(long_option)<EOL>kwargs['<STR_LIT>'].append(long_option.replace('<STR_LIT>', '<STR_LIT>' + group.replace('<STR_LIT:_>', '<STR_LIT:->') + '<STR_LIT:->'))<EOL>logger.debug('<STR_LIT>', kwargs['<STR_LIT>'])<EOL><DEDENT>self._group_parsers[group].add_argument(*kwargs.pop('<STR_LIT>'), **kwargs)<EOL><DEDENT>
Add the parameter to ``Parameters``.

        **Arguments**

        The arguments are lumped into two groups:``Parameters.add_parameter``
        and ``argparse.ArgumentParser.add_argument``.  Parameters that are only
        used by ``Parameters.add_parameter`` are removed before ``kwargs`` is
        passed directly to argparse.ArgumentParser.add_argument``.

        .. note::
            Once ``parse`` has been called ``Parameters.parsed`` will be True
            and it is inadvisable to add more parameters to the ``Parameters``.

        *``Parameters.add_parameter`` Arguments*

        :``environment_prefix``: Prefix to add when searching the environment
                                 for this parameter.  Default:
                                 os.path.basename(sys.argv[0]).
        :``group``:              Group (namespace or prefix) for parameter
                                 (corresponds to section name in configuration
                                 files).  Default: 'default'.
        :``options``:            REQUIRED.  The list of options to match for
                                 this parameter in argv.
        :``only``:               Iterable containing the components that this
                                 parameter applies to (i.e. 'environment',
                                 'configuration', 'argument').  Default:
                                 ('environment', 'configuration', 'argument').

        *``argparse.ArgumentParser.add_argument`` Arguments*

        :``name or flags``: Positional argument filled in by options keyword
                            argument.
        :``action``:        The basic type of action to be taken when this
                            argument is encountered at the command line.
        :``nargs``:         The number of command-line arguments that should be
                            consumed.
        :``const``:         A constant value required by some action and nargs
                            selections.
        :``default``:       The value produced if the argument is absent from
                            the command line.
        :``type``:          The type to which the command-line argument should
                            be converted.
        :``choices``:       A container of the allowable values for the
                            argument.
        :``required``:      Whether or not the command-line option may be
                            omitted (optionals only).
        :``help``:          A brief description of what the argument does.
        :``metavar``:       A name for the argument in usage messages.
        :``dest``:          The name of the attribute to be added to the object
                            returned by parse_args().