
    Design a function that determines the minimum batch size (as a power of 2) required to process a given number of banking transactions in the fraud detection system. The batch size must be optimized for the system's parallel processing capabilities while ensuring all transactions in the current queue are included. The function should return the smallest power of 2 that can accommodate all transactions in the queue.
    

    
def next_power_of_2(n):
    """
    Design a function that determines the minimum batch size (as a power of 2) required to process a given number of banking transactions in the fraud detection system. The batch size must be optimized for the system's parallel processing capabilities while ensuring all transactions in the current queue are included. The function should return the smallest power of 2 that can accommodate all transactions in the queue.
    

    """
def next_power_of_2(n):
    """
    Design a function that determines the minimum batch size (as a power of 2) required to process a given number of banking transactions in the fraud detection system. The batch size must be optimized for the system's parallel processing capabilities while ensuring all transactions in the current queue are included. The function should return the smallest power of 2 that can accommodate all transactions in the queue.
    

    """
    if n and (not n & n - 1):
        return n
    count = 0
    while n != 0:
        n >>= 1
        count += 1
    return 1 << count