
    Given the current number of content items in a user's social media feed, determine the minimum feed size (which must be a power of 2) needed to efficiently cache and distribute content recommendations. This optimization ensures that the content delivery system can handle the feed size while maintaining optimal performance in the recommendation engine.
    

    
def next_power_of_2(n):
    """
    Given the current number of content items in a user's social media feed, determine the minimum feed size (which must be a power of 2) needed to efficiently cache and distribute content recommendations. This optimization ensures that the content delivery system can handle the feed size while maintaining optimal performance in the recommendation engine.
    

    """
def next_power_of_2(n):
    """
    Given the current number of content items in a user's social media feed, determine the minimum feed size (which must be a power of 2) needed to efficiently cache and distribute content recommendations. This optimization ensures that the content delivery system can handle the feed size while maintaining optimal performance in the recommendation engine.
    

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