def sample_batch_indexes(low, high, size):
if high - low >= size:<EOL><INDENT>try:<EOL><INDENT>r = xrange(low, high)<EOL><DEDENT>except NameError:<EOL><INDENT>r = range(low, high)<EOL><DEDENT>batch_idxs = random.sample(r, size)<EOL><DEDENT>else:<EOL><INDENT>warnings.warn('<STR_LIT>')<EOL>batch_idxs = np.random.random_integers(low, high - <NUM_LIT:1>, size=size)<EOL><DEDENT>assert len(batch_idxs) == size<EOL>return batch_idxs<EOL>
Return a sample of (size) unique elements between low and high

        # Argument
            low (int): The minimum value for our samples
            high (int): The maximum value for our samples
            size (int): The number of samples to pick

        # Returns
            A list of samples of length size, with values between low and high