
    Design a function for the bank's fraud detection system that determines the minimum processing queue size (in powers of 2) needed to monitor a given number of concurrent transactions, ensuring sufficient capacity for real-time pattern analysis. The queue size must be a power of 2 and must be large enough to accommodate all concurrent transactions being monitored.
    

    
def next_power_of_2(n):
    """
    Design a function for the bank's fraud detection system that determines the minimum processing queue size (in powers of 2) needed to monitor a given number of concurrent transactions, ensuring sufficient capacity for real-time pattern analysis. The queue size must be a power of 2 and must be large enough to accommodate all concurrent transactions being monitored.
    

    """
def next_power_of_2(n):
    """
    Design a function for the bank's fraud detection system that determines the minimum processing queue size (in powers of 2) needed to monitor a given number of concurrent transactions, ensuring sufficient capacity for real-time pattern analysis. The queue size must be a power of 2 and must be large enough to accommodate all concurrent transactions being monitored.
    

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