def METHOD_NAME(pname, required_fn=lambda ctx: ctx.params.get('on'), **kwargs):
    """Return a command with two options.
        * an option created from the ``args`` and ``kwargs``
        * --opt, ``ConditionalOption`` with ``required_fn`` from ``kwargs``.
    """
    @click.command()
    @click.option(pname, **kwargs)
    @click.option('--opt', required_fn=required_fn, cls=ConditionalOption)
    def cmd(on, opt):
        """dummy command for testing"""
        # pylint: disable=unused-argument,invalid-name
        click.echo(opt)
    return cmd