
    Given the total number of students in a learning group, determine the smallest study cluster size (which must be a power of 2) that can accommodate all students for balanced peer-to-peer learning activities. The cluster size should ensure no student is left without a complete group for paired discussions and group work.
    

    
def next_power_of_2(n):
    """
    Given the total number of students in a learning group, determine the smallest study cluster size (which must be a power of 2) that can accommodate all students for balanced peer-to-peer learning activities. The cluster size should ensure no student is left without a complete group for paired discussions and group work.
    

    """
def next_power_of_2(n):
    """
    Given the total number of students in a learning group, determine the smallest study cluster size (which must be a power of 2) that can accommodate all students for balanced peer-to-peer learning activities. The cluster size should ensure no student is left without a complete group for paired discussions and group work.
    

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