def METHOD_NAME(key: bytes) -> bytes:
    """ Numerically increment the key as if it were a big-endian number (up to 32 bytes).
    >>> incr_key(bytes.fromhex('0000')).hex()
    '0001'
    >>> incr_key(bytes.fromhex('0001')).hex()
    '0002'
    >>> incr_key(bytes.fromhex('00ff')).hex()
    '0100'
    >>> incr_key(bytes.fromhex('ffff')).hex()
    Traceback (most recent call last):
     ...
    ValueError: cannot increment anymore
    >>> incr_key(bytes.fromhex('0affff')).hex()
    '0b0000'
    """
    a = bytearray(key)
    for i in reversed(range(len(a))):
        if a[i] != 0xff:
            a[i] += 1
            break
        a[i] = 0x00
    else:
        raise ValueError('cannot increment anymore')
    return bytes(a)