
    Given the number of credit data points (n) in a loan application, determine the minimum batch processing capacity needed for the bank's credit assessment algorithm, where the capacity must be a power of 2 to ensure optimal parallel processing. The function should return the smallest power of 2 that can accommodate all credit data points in a single batch.
    

    
def next_power_of_2(n):
    """
    Given the number of credit data points (n) in a loan application, determine the minimum batch processing capacity needed for the bank's credit assessment algorithm, where the capacity must be a power of 2 to ensure optimal parallel processing. The function should return the smallest power of 2 that can accommodate all credit data points in a single batch.
    

    """
def next_power_of_2(n):
    """
    Given the number of credit data points (n) in a loan application, determine the minimum batch processing capacity needed for the bank's credit assessment algorithm, where the capacity must be a power of 2 to ensure optimal parallel processing. The function should return the smallest power of 2 that can accommodate all credit data points in a single batch.
    

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