





def     lowerCamelCase_	(      lowerCAmelCase:	Union[str, Any]				)->		List[str]:
  if not head:
    return True
  # split the list to two parts
  _snake_case							,					_snake_case   :				str														=	head.next, head
  while fast and fast.next:
    _snake_case   :				Tuple														=	fast.next.next
    _snake_case   :				Optional[Any]														=	slow.next
  _snake_case   :				Optional[Any]														=	slow.next
  _snake_case   :				Any														=	None  # Don't forget here! But forget still works!
  # reverse the second part
  _snake_case   :				Tuple														=	None
  while second:
    _snake_case   :				int														=	second.next
    _snake_case   :				Optional[int]														=	node
    _snake_case   :				Optional[int]														=	second
    _snake_case   :				Tuple														=	nxt
  # compare two parts
  # second part has the same or one less node
  while node:
    if node.val != head.val:
      return False
    _snake_case   :				Any														=	node.next
    _snake_case   :				str														=	head.next
  return True


def     lowerCamelCase_	(      lowerCAmelCase:	List[Any]				)->		List[str]:
  if not head or not head.next:
    return True

  # 1. Get the midpoint (slow)
  _snake_case   :				Tuple														=	head
  while fast and fast.next:
    _snake_case							,					_snake_case   :				int														=	fast.next.next, slow.next

  # 2. Push the second half into the stack
  _snake_case   :				Any														=	[slow.val]
  while slow.next:
    _snake_case   :				Dict														=	slow.next
    stack.append(slow.val				)

  # 3. Comparison
  while stack:
    if stack.pop() != cur.val:
      return False
    _snake_case   :				Optional[Any]														=	cur.next

  return True







def     lowerCamelCase_	(      lowerCAmelCase:	List[Any]				)->		Dict:
  if not head or not head.next:
    return True
  _snake_case   :				List[str]														=	{}
  _snake_case   :				Union[str, Any]														=	0
  while head:
    if head.val in d:
      d[head.val].append(lowerCAmelCase__				)
    else:
      _snake_case   :				int														=	[pos]
    _snake_case   :				str														=	head.next
    pos += 1
  _snake_case   :				Union[str, Any]														=	pos - 1
  _snake_case   :				Tuple														=	0
  for v in d.values():
    if len(lowerCAmelCase__				) % 2 != 0:
      middle += 1
    else:
      _snake_case   :				List[Any]														=	0
      for i in range(0    ,							len(lowerCAmelCase__				)				):
        if v[i] + v[len(lowerCAmelCase__				) - 1 - step] != checksum:
          return False
        step += 1
    if middle > 1:
      return False
  return True











from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCAmelCase_						   =    logging.get_logger(__name__)

lowerCAmelCase_						   =    {
    """MIT/ast-finetuned-audioset-10-10-0.4593""": (
        """https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593/resolve/main/config.json"""
    ),
}



class        _lowerCAmelCase    (			UpperCAmelCase_							):


  '''simple docstring'''
  a_							:       Tuple      					="""audio-spectrogram-transformer"""







  def __init__(      self      :					List[Any]      ,				UpperCamelCase      :					Union[str, Any]=7_68      ,				UpperCamelCase      :					int=12      ,				UpperCamelCase      :					str=12      ,				UpperCamelCase      :					Tuple=30_72      ,				UpperCamelCase      :					Optional[Any]="gelu"      ,				UpperCamelCase      :					Any=0.0      ,				UpperCamelCase      :					Dict=0.0      ,				UpperCamelCase      :					List[Any]=0.02      ,				UpperCamelCase      :					Dict=1e-1_2      ,				UpperCamelCase      :					str=16      ,				UpperCamelCase      :					List[Any]=True      ,				UpperCamelCase      :					Any=10      ,				UpperCamelCase      :					Optional[int]=10      ,				UpperCamelCase      :					int=10_24      ,				UpperCamelCase      :					Optional[Any]=1_28      ,				**UpperCamelCase      :					Optional[Any]      ,				):


    '''simple docstring'''





    super().__init__(**UpperCamelCase							)

    _snake_case   :				Tuple														=	hidden_size
    _snake_case   :				str														=	num_hidden_layers
    _snake_case   :				Optional[Any]														=	num_attention_heads
    _snake_case   :				Optional[Any]														=	intermediate_size
    _snake_case   :				Optional[Any]														=	hidden_act
    _snake_case   :				List[str]														=	hidden_dropout_prob
    _snake_case   :				Union[str, Any]														=	attention_probs_dropout_prob
    _snake_case   :				Any														=	initializer_range
    _snake_case   :				List[str]														=	layer_norm_eps
    _snake_case   :				int														=	patch_size
    _snake_case   :				List[str]														=	qkv_bias
    _snake_case   :				int														=	frequency_stride
    _snake_case   :				List[Any]														=	time_stride
    _snake_case   :				List[Any]														=	max_length
    _snake_case   :				List[str]														=	num_mel_bins




