def check_sampling(sampling, n):
 if (sampling is None):
  sampling = 1.0
 if operator.isNumberType(sampling):
  sampling = SplitSampling(n, evaluation_fraction=sampling)
 return sampling

def check_sampling ( sampling , n ) : if ( sampling is None ) : sampling = 1.0 if operator . isNumberType ( sampling ) : sampling = SplitSampling ( n , evaluation_fraction = sampling ) return sampling
input checker utility for building a sampling in a user friendly way .