
    Design a function for an adaptive learning system that determines the optimal batch size for grouping learning modules, where the batch size must be the largest power of 2 that does not exceed the total number of available modules. This batch size will be used to create balanced learning segments that progressively increase in complexity while ensuring students can master prerequisites before advancing to more challenging content.
    

    
def highest_Power_of_2(n):
    """
    Design a function for an adaptive learning system that determines the optimal batch size for grouping learning modules, where the batch size must be the largest power of 2 that does not exceed the total number of available modules. This batch size will be used to create balanced learning segments that progressively increase in complexity while ensuring students can master prerequisites before advancing to more challenging content.
    

    """
def highest_Power_of_2(n):
    """
    Design a function for an adaptive learning system that determines the optimal batch size for grouping learning modules, where the batch size must be the largest power of 2 that does not exceed the total number of available modules. This batch size will be used to create balanced learning segments that progressively increase in complexity while ensuring students can master prerequisites before advancing to more challenging content.
    

    """
    res = 0
    for i in range(n, 0, -1):
        if i & i - 1 == 0:
            res = i
            break
    return res