"""simple docstring"""
import os
import tempfile
import unittest

from transformers import DistilBertConfig, is_torch_available
from transformers.testing_utils import require_torch, require_torch_gpu, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
					import torch

					from transformers import (
					    DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
					    DistilBertForMaskedLM,
					    DistilBertForMultipleChoice,
					    DistilBertForQuestionAnswering,
					    DistilBertForSequenceClassification,
					    DistilBertForTokenClassification,
					    DistilBertModel,
					)



class      lowerCAmelCase_			(	lowerCamelCase__    ):



				"""simple docstring"""

				def __init__( self						,			lowerCAmelCase						,			lowerCAmelCase=13						,			lowerCAmelCase=7						,			lowerCAmelCase=True						,			lowerCAmelCase=True						,			lowerCAmelCase=False						,			lowerCAmelCase=True						,			lowerCAmelCase=99						,			lowerCAmelCase=32						,			lowerCAmelCase=5						,			lowerCAmelCase=4						,			lowerCAmelCase=37						,			lowerCAmelCase="gelu"						,			lowerCAmelCase=0.1						,			lowerCAmelCase=0.1						,			lowerCAmelCase=5_12						,			lowerCAmelCase=16						,			lowerCAmelCase=2						,			lowerCAmelCase=0.02						,			lowerCAmelCase=3						,			lowerCAmelCase=4						,			lowerCAmelCase=None						,			):






										"""simple docstring"""

										snake_case	    =	parent
										snake_case	    =	batch_size
										snake_case	    =	seq_length
										snake_case	    =	is_training
										snake_case	    =	use_input_mask
										snake_case	    =	use_token_type_ids
										snake_case	    =	use_labels
										snake_case	    =	vocab_size
										snake_case	    =	hidden_size
										snake_case	    =	num_hidden_layers
										snake_case	    =	num_attention_heads
										snake_case	    =	intermediate_size
										snake_case	    =	hidden_act
										snake_case	    =	hidden_dropout_prob
										snake_case	    =	attention_probs_dropout_prob
										snake_case	    =	max_position_embeddings
										snake_case	    =	type_vocab_size
										snake_case	    =	type_sequence_label_size
										snake_case	    =	initializer_range
										snake_case	    =	num_labels
										snake_case	    =	num_choices
										snake_case	    =	scope

				def 						snake_case       ( self			):






										"""simple docstring"""

										snake_case	    =	ids_tensor([self.batch_size, self.seq_length]						,			self.vocab_size			)

										snake_case	    =	None
										if self.use_input_mask:
																snake_case	    =	random_attention_mask([self.batch_size, self.seq_length]			)

										snake_case	    =	None
										snake_case	    =	None
										snake_case	    =	None
										if self.use_labels:
																snake_case	    =	ids_tensor([self.batch_size]						,			self.type_sequence_label_size			)
																snake_case	    =	ids_tensor([self.batch_size, self.seq_length]						,			self.num_labels			)
																snake_case	    =	ids_tensor([self.batch_size]						,			self.num_choices			)

										snake_case	    =	self.get_config()

										return config, input_ids, input_mask, sequence_labels, token_labels, choice_labels

				def 						snake_case       ( self			):






										"""simple docstring"""

										return DistilBertConfig(
										    vocab_size=self.vocab_size						,			dim=self.hidden_size						,			n_layers=self.num_hidden_layers						,			n_heads=self.num_attention_heads						,			hidden_dim=self.intermediate_size						,			hidden_act=self.hidden_act						,			dropout=self.hidden_dropout_prob						,			attention_dropout=self.attention_probs_dropout_prob						,			max_position_embeddings=self.max_position_embeddings						,			initializer_range=self.initializer_range						,			)

				def 						snake_case       ( self						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase			):






										"""simple docstring"""

										snake_case	    =	DistilBertModel(config=lowercase__			)
										model.to(lowercase__			)
										model.eval()
										snake_case	    =	model(lowercase__						,			lowercase__			)
										snake_case	    =	model(lowercase__			)
										self.parent.assertEqual(result.last_hidden_state.shape						,			(self.batch_size, self.seq_length, self.hidden_size)			)

				def 						snake_case       ( self						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase			):






										"""simple docstring"""

										snake_case	    =	DistilBertForMaskedLM(config=lowercase__			)
										model.to(lowercase__			)
										model.eval()
										snake_case	    =	model(lowercase__						,			attention_mask=lowercase__						,			labels=lowercase__			)
										self.parent.assertEqual(result.logits.shape						,			(self.batch_size, self.seq_length, self.vocab_size)			)

				def 						snake_case       ( self						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase			):






										"""simple docstring"""

										snake_case	    =	DistilBertForQuestionAnswering(config=lowercase__			)
										model.to(lowercase__			)
										model.eval()
										snake_case	    =	model(
										    lowercase__						,			attention_mask=lowercase__						,			start_positions=lowercase__						,			end_positions=lowercase__			)
										self.parent.assertEqual(result.start_logits.shape						,			(self.batch_size, self.seq_length)			)
										self.parent.assertEqual(result.end_logits.shape						,			(self.batch_size, self.seq_length)			)

				def 						snake_case       ( self						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase			):






										"""simple docstring"""

										snake_case	    =	self.num_labels
										snake_case	    =	DistilBertForSequenceClassification(lowercase__			)
										model.to(lowercase__			)
										model.eval()
										snake_case	    =	model(lowercase__						,			attention_mask=lowercase__						,			labels=lowercase__			)
										self.parent.assertEqual(result.logits.shape						,			(self.batch_size, self.num_labels)			)

				def 						snake_case       ( self						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase			):






										"""simple docstring"""

										snake_case	    =	self.num_labels
										snake_case	    =	DistilBertForTokenClassification(config=lowercase__			)
										model.to(lowercase__			)
										model.eval()

										snake_case	    =	model(lowercase__						,			attention_mask=lowercase__						,			labels=lowercase__			)
										self.parent.assertEqual(result.logits.shape						,			(self.batch_size, self.seq_length, self.num_labels)			)

				def 						snake_case       ( self						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase						,			lowerCAmelCase			):






										"""simple docstring"""

										snake_case	    =	self.num_choices
										snake_case	    =	DistilBertForMultipleChoice(config=lowercase__			)
										model.to(lowercase__			)
										model.eval()
										snake_case	    =	input_ids.unsqueeze(1			).expand(-1						,			self.num_choices						,			-1			).contiguous()
										snake_case	    =	input_mask.unsqueeze(1			).expand(-1						,			self.num_choices						,			-1			).contiguous()
										snake_case	    =	model(
										    lowercase__						,			attention_mask=lowercase__						,			labels=lowercase__						,			)
										self.parent.assertEqual(result.logits.shape						,			(self.batch_size, self.num_choices)			)

				def 						snake_case       ( self			):






										"""simple docstring"""

										snake_case	    =	self.prepare_config_and_inputs()
										((snake_case)    ,(snake_case)    ,(snake_case)    ,(snake_case)    ,(snake_case)    ,(snake_case))	    =	config_and_inputs
										snake_case	    =	{'input_ids': input_ids, 'attention_mask': input_mask}
										return config, inputs_dict





@require_torch
class      lowerCAmelCase_			(	lowerCamelCase__   ,			lowerCamelCase__   ,			unittest.TestCase    ):



				"""simple docstring"""
				_lowerCAmelCase   :			List[Any]	     =  (
				    (
				        DistilBertModel,
				        DistilBertForMaskedLM,
				        DistilBertForMultipleChoice,
				        DistilBertForQuestionAnswering,
				        DistilBertForSequenceClassification,
				        DistilBertForTokenClassification,
				    )
				    if is_torch_available()
				    else None
				)
				_lowerCAmelCase   :			Dict	     =  (
				    {
				        'feature-extraction': DistilBertModel,
				        'fill-mask': DistilBertForMaskedLM,
				        'question-answering': DistilBertForQuestionAnswering,
				        'text-classification': DistilBertForSequenceClassification,
				        'token-classification': DistilBertForTokenClassification,
				        'zero-shot': DistilBertForSequenceClassification,
				    }
				    if is_torch_available()
				    else {}
				)
				_lowerCAmelCase   :			Union[str, Any]	     =  True
				_lowerCAmelCase   :			Dict	     =  True
				_lowerCAmelCase   :			Optional[Any]	     =  True
				_lowerCAmelCase   :			int	     =  True

				def 						snake_case       ( self			):






										"""simple docstring"""

										snake_case	    =	DistilBertModelTester(self			)
										snake_case	    =	ConfigTester(self						,			config_class=lowercase__						,			dim=37			)

				def 						snake_case       ( self			):






										"""simple docstring"""

										self.config_tester.run_common_tests()

				def 						snake_case       ( self			):






										"""simple docstring"""

										snake_case	    =	self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_distilbert_model(*lowercase__			)

				def 						snake_case       ( self			):






										"""simple docstring"""

										snake_case	    =	self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_distilbert_for_masked_lm(*lowercase__			)

				def 						snake_case       ( self			):






										"""simple docstring"""

										snake_case	    =	self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_distilbert_for_question_answering(*lowercase__			)

				def 						snake_case       ( self			):






										"""simple docstring"""

										snake_case	    =	self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_distilbert_for_sequence_classification(*lowercase__			)

				def 						snake_case       ( self			):






										"""simple docstring"""

										snake_case	    =	self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_distilbert_for_token_classification(*lowercase__			)

				def 						snake_case       ( self			):






										"""simple docstring"""

										snake_case	    =	self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_distilbert_for_multiple_choice(*lowercase__			)

				@slow
				def 						snake_case       ( self			):






										"""simple docstring"""

										for model_name in DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
																snake_case	    =	DistilBertModel.from_pretrained(lowercase__			)
																self.assertIsNotNone(lowercase__			)

				@slow
				@require_torch_gpu
				def 						snake_case       ( self			):






										"""simple docstring"""

										snake_case    ,snake_case	    =	self.model_tester.prepare_config_and_inputs_for_common()
										for model_class in self.all_model_classes:
																# BertForMultipleChoice behaves incorrectly in JIT environments.
																if model_class == DistilBertForMultipleChoice:
																						return

																snake_case	    =	True
																snake_case	    =	model_class(config=lowercase__			)

																snake_case	    =	self._prepare_for_class(lowercase__						,			lowercase__			)
																snake_case	    =	torch.jit.trace(
																    lowercase__						,			(inputs_dict['input_ids'].to('cpu'			), inputs_dict['attention_mask'].to('cpu'			))			)

																with tempfile.TemporaryDirectory() as tmp:
																						torch.jit.save(lowercase__						,			os.path.join(lowercase__						,			'traced_model.pt'			)			)
																						snake_case	    =	torch.jit.load(os.path.join(lowercase__						,			'traced_model.pt'			)						,			map_location=lowercase__			)
																						loaded(inputs_dict['input_ids'].to(lowercase__			)						,			inputs_dict['attention_mask'].to(lowercase__			)			)





@require_torch
class      lowerCAmelCase_			(	unittest.TestCase    ):



				"""simple docstring"""

				@slow
				def 						snake_case       ( self			):






										"""simple docstring"""

										snake_case	    =	DistilBertModel.from_pretrained('distilbert-base-uncased'			)
										snake_case	    =	torch.tensor([[0, 3_45, 2_32, 3_28, 7_40, 1_40, 16_95, 69, 60_78, 15_88, 2]]			)
										snake_case	    =	torch.tensor([[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]			)
										with torch.no_grad():
																snake_case	    =	model(lowercase__						,			attention_mask=lowercase__			)[0]
										snake_case	    =	torch.Size((1, 11, 7_68)			)
										self.assertEqual(output.shape						,			lowercase__			)
										snake_case	    =	torch.tensor(
										    [[[-0.16_39, 0.32_99, 0.16_48], [-0.17_46, 0.32_89, 0.17_10], [-0.18_84, 0.33_57, 0.18_10]]]			)

										self.assertTrue(torch.allclose(output[:, 1:4, 1:4]						,			lowercase__						,			atol=1E-4			)			)





'''simple docstring'''






from __future__ import annotations

from random import random
from typing import Generic, TypeVar

lowerCAmelCase__											=	TypeVar('''KT''')
lowerCAmelCase__											=	TypeVar('''VT''')






class 			lowercase_	(Generic[KT, VT]      ):




  """simple docstring"""




  def __init__(      self   :     Optional[Any]					,lowercase__   :     KT | str = "root"					,lowercase__   :     VT | None = None			):
   __lowercase							  = key
   __lowercase							  = value
   __lowercase							  = []






  def __repr__(      self   :     Tuple			):
   return F"Node({self.key}: {self.value})"






  @property
  def 					SCREAMING_SNAKE_CASE      (      self   :     int			):
   return len(self.forward			)






class 			lowercase_	(Generic[KT, VT]      ):




  """simple docstring"""




  def __init__(      self   :     int					,lowercase__   :     float = 0.5					,lowercase__   :     int = 1_6			):
   __lowercase							  = Node[KT, VT]()
   __lowercase							  = 0
   __lowercase							  = p
   __lowercase							  = max_level






  def __str__(      self   :     List[str]			):
   __lowercase							  = list(self			)

   if len(lowercase__			) == 0:
    return F"SkipList(level={self.level})"

   __lowercase							  = max((len(str(lowercase__			)			) for item in items)					,default=4			)
   __lowercase							  = max(lowercase__					,4			) + 4

   __lowercase							  = self.head
   __lowercase							  = []

   __lowercase							  = node.forward.copy()
   lines.append(F"[{node.key}]".ljust(lowercase__					,'''-'''			) + '''* ''' * len(lowercase__			)			)
   lines.append(''' ''' * label_size + '''| ''' * len(lowercase__			)			)

   while len(node.forward			) != 0:
    __lowercase							  = node.forward[0]

    lines.append(
        F"[{node.key}]".ljust(lowercase__					,'''-'''			)
        + ''' '''.join(str(n.key			) if n.key == node.key else '''|''' for n in forwards			)			)
    lines.append(''' ''' * label_size + '''| ''' * len(lowercase__			)			)
    __lowercase							  = node.forward

   lines.append('''None'''.ljust(lowercase__			) + '''* ''' * len(lowercase__			)			)
   return F"SkipList(level={self.level})\n" + "\n".join(lowercase__			)






  def __iter__(      self   :     List[str]			):
   __lowercase							  = self.head

   while len(node.forward			) != 0:
    yield node.forward[0].key
    __lowercase							  = node.forward[0]






  def 					SCREAMING_SNAKE_CASE      (      self   :     Optional[Any]			):
   __lowercase							  = 1
   while random() < self.p and level < self.max_level:
    level += 1

   return level






  def 					SCREAMING_SNAKE_CASE      (      self   :     List[str]					,lowercase__   :     str			):
   __lowercase							  = []

   __lowercase							  = self.head

   for i in reversed(range(self.level			)			):
    # i < node.level - When node level is lesser than `i` decrement `i`.
    # node.forward[i].key < key - Jumping to node with key value higher
    #                             or equal to searched key would result
    #                             in skipping searched key.
    while i < node.level and node.forward[i].key < key:
     __lowercase							  = node.forward[i]
    # Each leftmost node (relative to searched node) will potentially have to
    # be updated.
    update_vector.append(lowercase__			)

   update_vector.reverse()  # Note that we were inserting values in reverse order.

   # len(node.forward) != 0 - If current node doesn't contain any further
   #                          references then searched key is not present.
   # node.forward[0].key == key - Next node key should be equal to search key
   #                              if key is present.
   if len(node.forward			) != 0 and node.forward[0].key == key:
    return node.forward[0], update_vector
   else:
    return None, update_vector






  def 					SCREAMING_SNAKE_CASE      (      self   :     List[str]					,lowercase__   :     KT			):
   __lowercase  ,	__lowercase							  = self._locate_node(lowercase__			)

   if node is not None:
    for i, update_node in enumerate(lowercase__			):
     # Remove or replace all references to removed node.
     if update_node.level > i and update_node.forward[i].key == key:
      if node.level > i:
       __lowercase							  = node.forward[i]
      else:
       __lowercase							  = update_node.forward[:i]






  def 					SCREAMING_SNAKE_CASE      (      self   :     List[str]					,lowercase__   :     KT					,lowercase__   :     VT			):
   __lowercase  ,	__lowercase							  = self._locate_node(lowercase__			)
   if node is not None:
    __lowercase							  = value
   else:
    __lowercase							  = self.random_level()

    if level > self.level:
     # After level increase we have to add additional nodes to head.
     for _ in range(self.level - 1					,lowercase__			):
      update_vector.append(self.head			)
     __lowercase							  = level

    __lowercase							  = Node(lowercase__					,lowercase__			)

    for i, update_node in enumerate(update_vector[:level]			):
     # Change references to pass through new node.
     if update_node.level > i:
      new_node.forward.append(update_node.forward[i]			)

     if update_node.level < i + 1:
      update_node.forward.append(lowercase__			)
     else:
      __lowercase							  = new_node






  def 					SCREAMING_SNAKE_CASE      (      self   :     List[Any]					,lowercase__   :     VT			):
   __lowercase  ,	__lowercase							  = self._locate_node(lowercase__			)

   if node is not None:
    return node.value

   return None


def 		_A     (    ):






 """simple docstring"""



 __lowercase							  = SkipList()
 skip_list.insert('''Key1'''     ,				3      )
 skip_list.insert('''Key2'''     ,				12      )
 skip_list.insert('''Key3'''     ,				41      )
 skip_list.insert('''Key4'''     ,				-19      )

 __lowercase							  = skip_list.head
 __lowercase							  = {}
 while node.level != 0:
  __lowercase							  = node.forward[0]
  __lowercase							  = node.value

 assert len(A__      ) == 4
 assert all_values["Key1"] == 3
 assert all_values["Key2"] == 12
 assert all_values["Key3"] == 41
 assert all_values["Key4"] == -19


def 		_A     (    ):






 """simple docstring"""



 __lowercase							  = SkipList()
 skip_list.insert('''Key1'''     ,				10      )
 skip_list.insert('''Key1'''     ,				12      )

 skip_list.insert('''Key5'''     ,				7      )
 skip_list.insert('''Key7'''     ,				10      )
 skip_list.insert('''Key10'''     ,				5      )

 skip_list.insert('''Key7'''     ,				7      )
 skip_list.insert('''Key5'''     ,				5      )
 skip_list.insert('''Key10'''     ,				10      )

 __lowercase							  = skip_list.head
 __lowercase							  = {}
 while node.level != 0:
  __lowercase							  = node.forward[0]
  __lowercase							  = node.value

 if len(A__      ) != 4:
  print()
 assert len(A__      ) == 4
 assert all_values["Key1"] == 12
 assert all_values["Key7"] == 7
 assert all_values["Key5"] == 5
 assert all_values["Key10"] == 10


def 		_A     (    ):






 """simple docstring"""



 __lowercase							  = SkipList()
 assert skip_list.find('''Some key'''      ) is None


def 		_A     (    ):






 """simple docstring"""



 __lowercase							  = SkipList()

 skip_list.insert('''Key2'''     ,				20      )
 assert skip_list.find('''Key2'''      ) == 20

 skip_list.insert('''Some Key'''     ,				10      )
 skip_list.insert('''Key2'''     ,				8      )
 skip_list.insert('''V'''     ,				13      )

 assert skip_list.find('''Y'''      ) is None
 assert skip_list.find('''Key2'''      ) == 8
 assert skip_list.find('''Some Key'''      ) == 10
 assert skip_list.find('''V'''      ) == 13


def 		_A     (    ):






 """simple docstring"""



 __lowercase							  = SkipList()
 skip_list.delete('''Some key'''      )

 assert len(skip_list.head.forward      ) == 0


def 		_A     (    ):






 """simple docstring"""



 __lowercase							  = SkipList()

 skip_list.insert('''Key1'''     ,				12      )
 skip_list.insert('''V'''     ,				13      )
 skip_list.insert('''X'''     ,				14      )
 skip_list.insert('''Key2'''     ,				15      )

 skip_list.delete('''V'''      )
 skip_list.delete('''Key2'''      )

 assert skip_list.find('''V'''      ) is None
 assert skip_list.find('''Key2'''      ) is None


def 		_A     (    ):






 """simple docstring"""



 __lowercase							  = SkipList()

 skip_list.insert('''Key1'''     ,				12      )
 skip_list.insert('''V'''     ,				13      )
 skip_list.insert('''X'''     ,				14      )
 skip_list.insert('''Key2'''     ,				15      )

 skip_list.delete('''V'''      )
 assert skip_list.find('''V'''      ) is None
 assert skip_list.find('''X'''      ) == 14
 assert skip_list.find('''Key1'''      ) == 12
 assert skip_list.find('''Key2'''      ) == 15

 skip_list.delete('''X'''      )
 assert skip_list.find('''V'''      ) is None
 assert skip_list.find('''X'''      ) is None
 assert skip_list.find('''Key1'''      ) == 12
 assert skip_list.find('''Key2'''      ) == 15

 skip_list.delete('''Key1'''      )
 assert skip_list.find('''V'''      ) is None
 assert skip_list.find('''X'''      ) is None
 assert skip_list.find('''Key1'''      ) is None
 assert skip_list.find('''Key2'''      ) == 15

 skip_list.delete('''Key2'''      )
 assert skip_list.find('''V'''      ) is None
 assert skip_list.find('''X'''      ) is None
 assert skip_list.find('''Key1'''      ) is None
 assert skip_list.find('''Key2'''      ) is None


def 		_A     (    ):






 """simple docstring"""



 __lowercase							  = SkipList()

 skip_list.insert('''Key1'''     ,				12      )
 skip_list.insert('''V'''     ,				13      )
 skip_list.insert('''X'''     ,				142      )
 skip_list.insert('''Key2'''     ,				15      )

 skip_list.delete('''X'''      )

 def traverse_keys(A__      ):
  yield node.key
  for forward_node in node.forward:
   yield from traverse_keys(A__      )

 assert len(set(traverse_keys(skip_list.head      )      )      ) == 4


def 		_A     (    ):






 """simple docstring"""



 def is_sorted(A__      ):
  return all(next_item >= item for item, next_item in zip(A__     ,				lst[1:]      )      )

 __lowercase							  = SkipList()
 for i in range(10      ):
  skip_list.insert(A__     ,				A__      )
 assert is_sorted(list(A__      )      )
 skip_list.delete(5      )
 skip_list.delete(8      )
 skip_list.delete(2      )
 assert is_sorted(list(A__      )      )
 skip_list.insert(-12     ,				-12      )
 skip_list.insert(77     ,				77      )
 assert is_sorted(list(A__      )      )


def 		_A     (    ):






 """simple docstring"""



 for _ in range(100      ):
  # Repeat test 100 times due to the probabilistic nature of skip list
  # random values == random bugs
  test_insert()
  test_insert_overrides_existing_value()

  test_searching_empty_list_returns_none()
  test_search()

  test_deleting_item_from_empty_list_do_nothing()
  test_deleted_items_are_not_founded_by_find_method()
  test_delete_removes_only_given_key()
  test_delete_doesnt_leave_dead_nodes()

  test_iter_always_yields_sorted_values()


def 		_A     (    ):






 """simple docstring"""



 __lowercase							  = SkipList()
 skip_list.insert(2     ,				'''2'''      )
 skip_list.insert(4     ,				'''4'''      )
 skip_list.insert(6     ,				'''4'''      )
 skip_list.insert(4     ,				'''5'''      )
 skip_list.insert(8     ,				'''4'''      )
 skip_list.insert(9     ,				'''4'''      )

 skip_list.delete(4      )

 print(A__      )


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 main()

