def nextpow2(x):
    """
    Return next power of two that is >= integer `x`

    Examples
    --------
    >>> nextpow2(4)
    4
    >>> nextpow2(5)
    8
    """
    return 1 << (x - 1).bit_length()