
"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


_a   :      List[Any]       =				logging.get_logger(__name__)

_a   :      List[Any]       =				{
    """openbmb/cpm-ant-10b""": """https://huggingface.co/openbmb/cpm-ant-10b/blob/main/config.json"""
    # See all CPMAnt models at https://huggingface.co/models?filter=cpmant
}






class   _UpperCAmelCase					(       _snake_case):
    __lowercase				:			List[str]	=       """cpmant"""
    def __init__(     self    ,     snake_case_ = 3_07_20    ,     snake_case_ = 40_96    ,     snake_case_ = 32    ,     snake_case_ = 1_28    ,     snake_case_ = 1_02_40    ,     snake_case_ = 48    ,     snake_case_ = 0.0    ,     snake_case_ = 5_12    ,     snake_case_ = 20_48    ,     snake_case_ = 1E-6    ,     snake_case_ = 1.0    ,     snake_case_ = 32    ,     snake_case_ = 32    ,     snake_case_ = 32    ,     snake_case_ = True    ,     **snake_case_    ,     ):
      super().__init__(**snake_case_  )
      _snake_case  :    Optional[Any]            = prompt_types
      _snake_case  :    Optional[Any]            = prompt_length
      _snake_case  :    List[str]            = segment_types
      _snake_case  :    int            = hidden_size
      _snake_case  :    str            = num_attention_heads
      _snake_case  :    List[str]            = dim_head
      _snake_case  :    List[str]            = dim_ff
      _snake_case  :    str            = num_hidden_layers
      _snake_case  :    int            = position_bias_num_buckets
      _snake_case  :    Union[str, Any]            = position_bias_max_distance
      _snake_case  :    Union[str, Any]            = dropout_p
      _snake_case  :    str            = eps
      _snake_case  :    Dict            = use_cache
      _snake_case  :    str            = vocab_size
      _snake_case  :    Optional[int]            = init_std



"""simple docstring"""
from __future__ import annotations

from statistics import mean
def 					a__ ( a :					list[int]		):

  """simple docstring"""







  _snake_case  :    List[str]            = 2
  _snake_case  :    Union[str, Any]            = list(a		)
  _snake_case  :    Any            = [0] * len(a		)
  _snake_case  :    Any            = 0
  while True:
    _snake_case  :    str            = True
    for i, burst_time in enumerate(a		):
      if rem_burst_times[i] > 0:
        _snake_case  :    str            = False
        if rem_burst_times[i] > quantum:
          t += quantum
          rem_burst_times[i] -= quantum
        else:
          t += rem_burst_times[i]
          _snake_case  :    int            = t - burst_time
          _snake_case  :    Dict            = 0
    if done is True:
      return waiting_times
def 					a__ ( a :					list[int]							,  a :					list[int]		):

  """simple docstring"""







  return [burst + waiting for burst, waiting in zip(a							,  a		)]


if __name__ == "__main__":
    _a   :      Dict       =				[3, 5, 7]
    _a   :      Dict       =				calculate_waiting_times(burst_times)
    _a   :      Tuple       =				calculate_turn_around_times(burst_times, waiting_times)
    print("""Process ID \tBurst Time \tWaiting Time \tTurnaround Time""")
    for i, burst_time in enumerate(burst_times):
        print(
            f'  {i + 1}\t\t  {burst_time}\t\t  {waiting_times[i]}\t\t  '
            f'{turn_around_times[i]}'
        )
    print(f'\nAverage waiting time = {mean(waiting_times):.5f}')
    print(f'Average turn around time = {mean(turn_around_times):.5f}')

