parameters: (iterable, r)
return_statement: return tuple(pool[i] for i in indices)
docstring: Return a random *r* length subsequence of the elements in *iterable*.
  
          >>> random_combination(range(5), 3)  # doctest:+SKIP
          (2, 3, 4)
  
      This equivalent to taking a random selection from
      ``itertools.combinations(iterable, r)``.
docstring_summary: Return a random *r* length subsequence of the elements in *iterable*.
docstring_tokens: Return a random * r * length subsequence of the elements in * iterable * .
function: def random_combination(iterable, r):
      """Return a random *r* length subsequence of the elements in *iterable*.
  
          >>> random_combination(range(5), 3)  # doctest:+SKIP
          (2, 3, 4)
  
      This equivalent to taking a random selection from
      ``itertools.combinations(iterable, r)``.
  
      """
      pool = tuple(iterable)
      n = len(pool)
      indices = sorted(sample(range(n), r))
      return tuple(pool[i] for i in indices)
function_tokens: def random_combination ( iterable , r ) : pool = tuple ( iterable ) n = len ( pool ) indices = sorted ( sample ( range ( n ) , r ) ) return tuple ( pool [ i ] for i in indices )