
    Given the total number of potential event matches for a user in a social networking platform, determine the largest batch size (which must be a power of 2) that can be processed without exceeding the available event count, ensuring optimal performance of the recommendation system. For example, if there are 100 event matches, the function should return 64 as the largest power of 2 that can be used for batch processing.
    

    
def highest_Power_of_2(n):
    """
    Given the total number of potential event matches for a user in a social networking platform, determine the largest batch size (which must be a power of 2) that can be processed without exceeding the available event count, ensuring optimal performance of the recommendation system. For example, if there are 100 event matches, the function should return 64 as the largest power of 2 that can be used for batch processing.
    

    """
def highest_Power_of_2(n):
    """
    Given the total number of potential event matches for a user in a social networking platform, determine the largest batch size (which must be a power of 2) that can be processed without exceeding the available event count, ensuring optimal performance of the recommendation system. For example, if there are 100 event matches, the function should return 64 as the largest power of 2 that can be used for batch processing.
    

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