def _generate_sample_indices(random_state, n_samples):
 random_instance = check_random_state(random_state)
 sample_indices = random_instance.randint(0, n_samples, n_samples)
 return sample_indices

def _generate_sample_indices ( random_state , n_samples ) : random_instance = check_random_state ( random_state ) sample_indices = random_instance . randint ( 0 , n_samples , n_samples ) return sample_indices
private function used to _parallel_build_trees function .