Return the weight corresponding to given powers.

def _compute_weight(powers, wg):
    """Return the weight corresponding to given powers."""
    # split
    pow1 = (powers[0], 0)
    pow2 = (0, powers[1])

    cal1 = _compute_value(pow1, wg)
    cal2 = _compute_value(pow2, wg)

    return cal1 * cal2