
    i                    (    d Z ddlmZ ddlmZ ddZy)z0Util functions for statistics in gcloud storage.    )annotations)Listc                    | sy| j                          |dz  t        |       dz
  z  }t        |      }|j                         r| |   S | |   }| t        |dz            }|||z
  ||z
  z  z   S )zFinds the percentile value for a given list of values.

  Args:
    values: The list of values to find the percentile in.
    percentile: The percentile to find.

  Returns:
    The percentile value.
  Nd      )sortlenint
is_integer)values
percentileindex	index_intlower_valueupper_values         9lib/googlecloudsdk/command_lib/storage/statistics_util.pyfind_percentiler      s     

++-Fa
0%%j)
) #KUQY(K+3	8IJJJ    N)r   z	List[int]r   floatreturnzfloat | None)__doc__
__future__r   typingr   r    r   r   <module>r      s    7 " Kr   