def METHOD_NAME(self, parser, name, width, default, required):
    help = "bind the applet I/O lines {!r} to pins SET".format(name)
    if default is not None:
        if default:
            help += " (default: %(default)s)"
        else:
            help += " (default is empty)"
    opt_name = "--pins-" + name.lower().replace("_", "-")
    parser.add_argument(
        opt_name, dest="pin_set_{}".format(name), metavar="SET",
        type=functools.partial(self._pin_set, width), default=default, required=required,
        help=help)