def round_power_2(value):
 if (value == 0):
  return 0
 return math.pow(2, math.ceil(math.log(value, 2)))

def round_power_2 ( value ) : if ( value == 0 ) : return 0 return math . pow ( 2 , math . ceil ( math . log ( value , 2 ) ) )
return value rounded up to the nearest power of 2 .