def percentage(value: str) -> float:
    """
    ``argparse`` argument type that checks that its value is a percentage (in
    the sense of a float in the range [0, 100]).
    """
    try:
        fvalue = float(value)
        assert 0 <= fvalue <= 100
    except (AssertionError, TypeError, ValueError):
        raise ArgumentTypeError(
            "{!r} is an invalid percentage value".format(value))
    return fvalue
``argparse`` argument type that checks that its value is a percentage (in
    the sense of a float in the range [0, 100]).