def needs_test_with_all_aes_implementations(func):
    """Function decorator to run a unit test multiple times:
    once with each AES implementation.

    NOTE: this is inherently sequential;
    tests running in parallel would break things
    """
    if FAST_TESTS:  # if set, only run tests once, using fastest implementation
        return func
    has_cryptodome = crypto.HAS_CRYPTODOME
    has_cryptography = crypto.HAS_CRYPTOGRAPHY
    has_pyaes = crypto.HAS_PYAES
    if asyncio.iscoroutinefunction(func):
        async def run_test(*args, **kwargs):
            try:
                if has_pyaes:
                    (crypto.HAS_CRYPTODOME, crypto.HAS_CRYPTOGRAPHY, crypto.HAS_PYAES) = False, False, True
                    await func(*args, **kwargs)  # pyaes
                if has_cryptodome:
                    (crypto.HAS_CRYPTODOME, crypto.HAS_CRYPTOGRAPHY, crypto.HAS_PYAES) = True, False, False
                    await func(*args, **kwargs)  # cryptodome
                if has_cryptography:
                    (crypto.HAS_CRYPTODOME, crypto.HAS_CRYPTOGRAPHY, crypto.HAS_PYAES) = False, True, False
                    await func(*args, **kwargs)  # cryptography
            finally:
                crypto.HAS_CRYPTODOME = has_cryptodome
                crypto.HAS_CRYPTOGRAPHY = has_cryptography
                crypto.HAS_PYAES = has_pyaes
    else:
        def run_test(*args, **kwargs):
            try:
                if has_pyaes:
                    (crypto.HAS_CRYPTODOME, crypto.HAS_CRYPTOGRAPHY, crypto.HAS_PYAES) = False, False, True
                    func(*args, **kwargs)  # pyaes
                if has_cryptodome:
                    (crypto.HAS_CRYPTODOME, crypto.HAS_CRYPTOGRAPHY, crypto.HAS_PYAES) = True, False, False
                    func(*args, **kwargs)  # cryptodome
                if has_cryptography:
                    (crypto.HAS_CRYPTODOME, crypto.HAS_CRYPTOGRAPHY, crypto.HAS_PYAES) = False, True, False
                    func(*args, **kwargs)  # cryptography
            finally:
                crypto.HAS_CRYPTODOME = has_cryptodome
                crypto.HAS_CRYPTOGRAPHY = has_cryptography
                crypto.HAS_PYAES = has_pyaes
    return run_test
Function decorator to run a unit test multiple times:
    once with each AES implementation.

    NOTE: this is inherently sequential;
    tests running in parallel would break things
    
tests/test_bitcoin.py