Function name: g2Test_perm
Description:

The functions calculates the test statistic of the G^2 test of conditional independence between x and y conditional on a set of variable(s) cs with permutations.

Authors: Michail Tsagris and Manos Papadakis