parameters: (values, count)
return_statement: return [
        # We divide by count - 1 to make sure we always get the first and the last
        # element.
        values[(len(values) - 1) * i // (count - 1)] for i in xrange(count)
    ]
docstring: Samples `count` values uniformly from `values`.
  
    Args:
      values: The values to sample from.
      count: The number of values to sample. Must be at least 2.
  
    Raises:
      ValueError: If `count` is not at least 2.
      TypeError: If `type(count) != int`.
  
    Returns:
      A list of values from `values`. The first and the last element will always
      be included. If `count > len(values)`, then all values will be returned.
docstring_summary: Samples `count` values uniformly from `values`.
docstring_tokens: Samples count values uniformly from values .
function: def _uniform_sample(values, count):
    """Samples `count` values uniformly from `values`.
  
    Args:
      values: The values to sample from.
      count: The number of values to sample. Must be at least 2.
  
    Raises:
      ValueError: If `count` is not at least 2.
      TypeError: If `type(count) != int`.
  
    Returns:
      A list of values from `values`. The first and the last element will always
      be included. If `count > len(values)`, then all values will be returned.
    """
  
    if count < 2:
      raise ValueError('Must sample at least 2 elements, %d requested' % count)
  
    if count >= len(values):
      # Copy the list in case the caller mutates it.
      return list(values)
  
    return [
        # We divide by count - 1 to make sure we always get the first and the last
        # element.
        values[(len(values) - 1) * i // (count - 1)] for i in xrange(count)
    ]
function_tokens: def _uniform_sample ( values , count ) : if count < 2 : raise ValueError ( 'Must sample at least 2 elements, %d requested' % count ) if count >= len ( values ) : # Copy the list in case the caller mutates it. return list ( values ) return [ # We divide by count - 1 to make sure we always get the first and the last # element. values [ ( len ( values ) - 1 ) * i // ( count - 1 ) ] for i in xrange ( count ) ]