





"""simple docstring"""
import random
import unittest

import numpy as np

import transformers
from transformers import is_flax_available, is_torch_available
from transformers.testing_utils import is_pt_flax_cross_test, require_flax


if is_flax_available():
  import os

  import jax.numpy as jnp
  from jax import jit

  from transformers import AutoTokenizer, FlaxAutoModelForCausalLM
  from transformers.modeling_flax_pytorch_utils import load_flax_weights_in_pytorch_model

  lowerCamelCase_								=		"0.12"  # assumed parallelism: 8


if is_torch_available():
  import torch



def      __lowerCamelCase   (							a_     :		Dict ,   a_     :		Dict ,   a_     :		Tuple=None							)			->      Optional[Any]:
      if rng is None:
            __SCREAMING_SNAKE_CASE   :Optional[Any]						=  random.Random()

      __SCREAMING_SNAKE_CASE   :Dict						=  1
      for dim in shape:
            total_dims *= dim

      __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  []
      for _ in range(a_							):
            values.append(rng.randint(0 ,   vocab_size - 1							)							)

      __SCREAMING_SNAKE_CASE   :str						=  np.array(a_ ,   dtype=jnp.intaa							).reshape(a_							)

      return output



def      __lowerCamelCase   (							a_     :		Union[str, Any] ,   a_     :		Tuple=None							)			->      Optional[int]:
      __SCREAMING_SNAKE_CASE   :Optional[Any]						=  ids_tensor(a_ ,   vocab_size=2 ,   rng=a_							)
      # make sure that at least one token is attended to for each batch
      __SCREAMING_SNAKE_CASE   :List[str]						=  1
      return attn_mask






@require_flax
class 					_SCREAMING_SNAKE_CASE:
       SCREAMING_SNAKE_CASE_   :      Union[str, Any]							=  None
       SCREAMING_SNAKE_CASE_   :      str							=  ()




       def     _UpperCamelCase     (						self							)			->      List[Any]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :Dict						=  self.model_tester.prepare_config_and_inputs_for_common()

             # cut to half length & take max batch_size 3
             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  2
             __SCREAMING_SNAKE_CASE   :List[str]						=  inputs['''input_ids'''].shape[-1] // 2
             __SCREAMING_SNAKE_CASE   :Tuple						=  inputs['''input_ids'''][:max_batch_size, :sequence_length]

             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  jnp.ones_like(SCREAMING_SNAKE_CASE__							)
             __SCREAMING_SNAKE_CASE   :Dict						=  attention_mask[:max_batch_size, :sequence_length]

             # generate max 5 tokens
             __SCREAMING_SNAKE_CASE   :Dict						=  input_ids.shape[-1] + 5
             if config.eos_token_id is not None and config.pad_token_id is None:
                   # hack to allow generate for models such as GPT2 as is done in `generate()`
                   __SCREAMING_SNAKE_CASE   :List[str]						=  config.eos_token_id
             return config, input_ids, attention_mask, max_length




       @is_pt_flax_cross_test
       def     _UpperCamelCase     (						self							)			->      List[str]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :int						=  self._get_input_ids_and_config()
             __SCREAMING_SNAKE_CASE   :Tuple						=  False
             __SCREAMING_SNAKE_CASE   :str						=  max_length
             __SCREAMING_SNAKE_CASE   :int						=  0

             for model_class in self.all_generative_model_classes:
                   __SCREAMING_SNAKE_CASE   :Any						=  model_class(SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :List[Any]						=  model_class.__name__[4:]  # Skip the "Flax" at the beginning
                   __SCREAMING_SNAKE_CASE   :List[str]						=  getattr(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							)
                   __SCREAMING_SNAKE_CASE   :List[Any]						=  pt_model_class(SCREAMING_SNAKE_CASE__							).eval()
                   __SCREAMING_SNAKE_CASE   :List[str]						=  load_flax_weights_in_pytorch_model(SCREAMING_SNAKE_CASE__		,flax_model.params							)

                   __SCREAMING_SNAKE_CASE   :str						=  flax_model.generate(SCREAMING_SNAKE_CASE__							).sequences
                   __SCREAMING_SNAKE_CASE   :Dict						=  pt_model.generate(torch.tensor(SCREAMING_SNAKE_CASE__		,dtype=torch.long							)							)

                   if flax_generation_outputs.shape[-1] > pt_generation_outputs.shape[-1]:
                         __SCREAMING_SNAKE_CASE   :Tuple						=  flax_generation_outputs[:, : pt_generation_outputs.shape[-1]]

                   self.assertListEqual(pt_generation_outputs.numpy().tolist()		,flax_generation_outputs.tolist()							)




       def     _UpperCamelCase     (						self							)			->      int:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :Tuple						=  self._get_input_ids_and_config()
             __SCREAMING_SNAKE_CASE   :List[str]						=  False
             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  max_length

             for model_class in self.all_generative_model_classes:
                   __SCREAMING_SNAKE_CASE   :Optional[int]						=  model_class(SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :str						=  model.generate(SCREAMING_SNAKE_CASE__							).sequences
                   self.assertEqual(generation_outputs.shape[-1]		,SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  jit(model.generate							)
                   __SCREAMING_SNAKE_CASE   :Optional[Any]						=  jit_generate(SCREAMING_SNAKE_CASE__							).sequences

                   self.assertListEqual(generation_outputs.tolist()		,jit_generation_outputs.tolist()							)




       def     _UpperCamelCase     (						self							)			->      Dict:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :Tuple						=  self._get_input_ids_and_config()
             __SCREAMING_SNAKE_CASE   :List[str]						=  True
             __SCREAMING_SNAKE_CASE   :int						=  max_length

             for model_class in self.all_generative_model_classes:
                   __SCREAMING_SNAKE_CASE   :Optional[Any]						=  model_class(SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :Any						=  model.generate(SCREAMING_SNAKE_CASE__							).sequences
                   self.assertEqual(generation_outputs.shape[-1]		,SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  jit(model.generate							)
                   __SCREAMING_SNAKE_CASE   :str						=  jit_generate(SCREAMING_SNAKE_CASE__							).sequences

                   self.assertListEqual(generation_outputs.tolist()		,jit_generation_outputs.tolist()							)




       def     _UpperCamelCase     (						self							)			->      int:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :Optional[int]						=  self._get_input_ids_and_config()
             __SCREAMING_SNAKE_CASE   :Dict						=  False
             __SCREAMING_SNAKE_CASE   :List[Any]						=  max_length
             __SCREAMING_SNAKE_CASE   :List[Any]						=  2

             for model_class in self.all_generative_model_classes:
                   __SCREAMING_SNAKE_CASE   :Optional[int]						=  model_class(SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :Optional[Any]						=  model.generate(SCREAMING_SNAKE_CASE__							).sequences
                   self.assertEqual(generation_outputs.shape[-1]		,SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :List[str]						=  jit(model.generate							)
                   __SCREAMING_SNAKE_CASE   :Optional[Any]						=  jit_generate(SCREAMING_SNAKE_CASE__							).sequences

                   self.assertListEqual(generation_outputs.tolist()		,jit_generation_outputs.tolist()							)




       def     _UpperCamelCase     (						self							)			->      int:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :str						=  self._get_input_ids_and_config()
             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  False
             __SCREAMING_SNAKE_CASE   :Optional[int]						=  max_length
             __SCREAMING_SNAKE_CASE   :Any						=  2
             __SCREAMING_SNAKE_CASE   :Tuple						=  2

             for model_class in self.all_generative_model_classes:
                   __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  model_class(SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :Tuple						=  model.generate(SCREAMING_SNAKE_CASE__							).sequences
                   self.assertEqual(generation_outputs.shape[0]		,input_ids.shape[0] * config.num_return_sequences							)




       def     _UpperCamelCase     (						self							)			->      Optional[int]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :Optional[Any]						=  self._get_input_ids_and_config()
             __SCREAMING_SNAKE_CASE   :Dict						=  True
             __SCREAMING_SNAKE_CASE   :int						=  max_length
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  0.8
             __SCREAMING_SNAKE_CASE   :List[str]						=  10
             __SCREAMING_SNAKE_CASE   :Tuple						=  0.3
             __SCREAMING_SNAKE_CASE   :Tuple						=  1
             __SCREAMING_SNAKE_CASE   :Tuple						=  8
             __SCREAMING_SNAKE_CASE   :Any						=  9

             for model_class in self.all_generative_model_classes:
                   __SCREAMING_SNAKE_CASE   :Tuple						=  model_class(SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :List[Any]						=  model.generate(SCREAMING_SNAKE_CASE__							).sequences
                   self.assertEqual(generation_outputs.shape[-1]		,SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :List[str]						=  jit(model.generate							)
                   __SCREAMING_SNAKE_CASE   :Tuple						=  jit_generate(SCREAMING_SNAKE_CASE__							).sequences

                   self.assertListEqual(generation_outputs.tolist()		,jit_generation_outputs.tolist()							)




       def     _UpperCamelCase     (						self							)			->      str:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :Optional[int]						=  self._get_input_ids_and_config()
             __SCREAMING_SNAKE_CASE   :Any						=  max_length
             __SCREAMING_SNAKE_CASE   :int						=  1
             __SCREAMING_SNAKE_CASE   :Tuple						=  8
             __SCREAMING_SNAKE_CASE   :Tuple						=  9

             for model_class in self.all_generative_model_classes:
                   __SCREAMING_SNAKE_CASE   :Optional[int]						=  model_class(SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :List[str]						=  model.generate(SCREAMING_SNAKE_CASE__							).sequences
                   self.assertEqual(generation_outputs.shape[-1]		,SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :int						=  jit(model.generate							)
                   __SCREAMING_SNAKE_CASE   :str						=  jit_generate(SCREAMING_SNAKE_CASE__							).sequences

                   self.assertListEqual(generation_outputs.tolist()		,jit_generation_outputs.tolist()							)




       def     _UpperCamelCase     (						self							)			->      Dict:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :str						=  self._get_input_ids_and_config()
             __SCREAMING_SNAKE_CASE   :Optional[int]						=  max_length
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  2
             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  1
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  8
             __SCREAMING_SNAKE_CASE   :List[str]						=  9

             for model_class in self.all_generative_model_classes:
                   __SCREAMING_SNAKE_CASE   :Optional[Any]						=  model_class(SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :str						=  model.generate(SCREAMING_SNAKE_CASE__							).sequences
                   self.assertEqual(generation_outputs.shape[-1]		,SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :int						=  jit(model.generate							)
                   __SCREAMING_SNAKE_CASE   :Any						=  jit_generate(SCREAMING_SNAKE_CASE__							).sequences

                   self.assertListEqual(generation_outputs.tolist()		,jit_generation_outputs.tolist()							)




       def     _UpperCamelCase     (						self							)			->      str:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :List[Any]						=  self._get_input_ids_and_config()

             # pad attention mask on the left
             __SCREAMING_SNAKE_CASE   :List[Any]						=  attention_mask.at[(0, 0)].set(0							)

             __SCREAMING_SNAKE_CASE   :List[str]						=  False
             __SCREAMING_SNAKE_CASE   :Dict						=  max_length

             for model_class in self.all_generative_model_classes:
                   __SCREAMING_SNAKE_CASE   :List[str]						=  model_class(SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :List[str]						=  model.generate(SCREAMING_SNAKE_CASE__		,attention_mask=SCREAMING_SNAKE_CASE__							).sequences
                   self.assertEqual(generation_outputs.shape[-1]		,SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :List[Any]						=  jit(model.generate							)
                   __SCREAMING_SNAKE_CASE   :Tuple						=  jit_generate(SCREAMING_SNAKE_CASE__		,attention_mask=SCREAMING_SNAKE_CASE__							).sequences

                   self.assertListEqual(generation_outputs.tolist()		,jit_generation_outputs.tolist()							)




       def     _UpperCamelCase     (						self							)			->      Tuple:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :Union[str, Any]						=  self._get_input_ids_and_config()

             # pad attention mask on the left
             __SCREAMING_SNAKE_CASE   :Tuple						=  attention_mask.at[(0, 0)].set(0							)

             __SCREAMING_SNAKE_CASE   :Optional[int]						=  True
             __SCREAMING_SNAKE_CASE   :List[str]						=  max_length

             for model_class in self.all_generative_model_classes:
                   __SCREAMING_SNAKE_CASE   :Dict						=  model_class(SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :int						=  model.generate(SCREAMING_SNAKE_CASE__		,attention_mask=SCREAMING_SNAKE_CASE__							).sequences
                   self.assertEqual(generation_outputs.shape[-1]		,SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  jit(model.generate							)
                   __SCREAMING_SNAKE_CASE   :Dict						=  jit_generate(SCREAMING_SNAKE_CASE__		,attention_mask=SCREAMING_SNAKE_CASE__							).sequences

                   self.assertListEqual(generation_outputs.tolist()		,jit_generation_outputs.tolist()							)




       def     _UpperCamelCase     (						self							)			->      Dict:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE				,__SCREAMING_SNAKE_CASE   :Optional[int]						=  self._get_input_ids_and_config()

             # pad attention mask on the left
             __SCREAMING_SNAKE_CASE   :List[str]						=  attention_mask.at[(0, 0)].set(0							)

             __SCREAMING_SNAKE_CASE   :str						=  2
             __SCREAMING_SNAKE_CASE   :str						=  max_length

             for model_class in self.all_generative_model_classes:
                   __SCREAMING_SNAKE_CASE   :List[str]						=  model_class(SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  model.generate(SCREAMING_SNAKE_CASE__		,attention_mask=SCREAMING_SNAKE_CASE__							).sequences
                   self.assertEqual(generation_outputs.shape[-1]		,SCREAMING_SNAKE_CASE__							)

                   __SCREAMING_SNAKE_CASE   :Optional[int]						=  jit(model.generate							)
                   __SCREAMING_SNAKE_CASE   :Dict						=  jit_generate(SCREAMING_SNAKE_CASE__		,attention_mask=SCREAMING_SNAKE_CASE__							).sequences

                   self.assertListEqual(generation_outputs.tolist()		,jit_generation_outputs.tolist()							)






@require_flax
class 					_SCREAMING_SNAKE_CASE(   unittest.TestCase  ):




       def     _UpperCamelCase     (						self							)			->      Optional[Any]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  AutoTokenizer.from_pretrained('''hf-internal-testing/tiny-bert'''							)
             __SCREAMING_SNAKE_CASE   :str						=  FlaxAutoModelForCausalLM.from_pretrained('''hf-internal-testing/tiny-bert-flax-only'''							)

             __SCREAMING_SNAKE_CASE   :Optional[int]						=  '''Hello world'''
             __SCREAMING_SNAKE_CASE   :List[Any]						=  tokenizer(SCREAMING_SNAKE_CASE__		,return_tensors='''np'''							).input_ids

             # typos are quickly detected (the correct argument is `do_sample`)
             with self.assertRaisesRegex(SCREAMING_SNAKE_CASE__		,'''do_samples'''							):
                   model.generate(SCREAMING_SNAKE_CASE__		,do_samples=SCREAMING_SNAKE_CASE__							)

             # arbitrary arguments that will not be used anywhere are also not accepted
             with self.assertRaisesRegex(SCREAMING_SNAKE_CASE__		,'''foo'''							):
                   __SCREAMING_SNAKE_CASE   :Tuple						=  {'''foo''': '''bar'''}
                   model.generate(SCREAMING_SNAKE_CASE__		,**SCREAMING_SNAKE_CASE__							)






"""simple docstring"""
from manim import *






class 					_SCREAMING_SNAKE_CASE(   A  ):




       def     _UpperCamelCase     (						self							)			->      str:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  Rectangle(height=0.5		,width=0.5							)
             __SCREAMING_SNAKE_CASE   :List[str]						=  Rectangle(height=0.4_6		,width=0.4_6							).set_stroke(width=0							)

             __SCREAMING_SNAKE_CASE   :List[str]						=  [mem.copy() for i in range(6							)]
             __SCREAMING_SNAKE_CASE   :List[str]						=  [mem.copy() for i in range(6							)]
             __SCREAMING_SNAKE_CASE   :Optional[int]						=  VGroup(*SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0							)
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  VGroup(*SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0							)
             __SCREAMING_SNAKE_CASE   :Any						=  VGroup(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0							)
             __SCREAMING_SNAKE_CASE   :Tuple						=  Text('''CPU'''		,font_size=24							)
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  Group(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0.5		,aligned_edge=SCREAMING_SNAKE_CASE__							)
             cpu.move_to([-2.5, -0.5, 0]							)
             self.add(SCREAMING_SNAKE_CASE__							)

             __SCREAMING_SNAKE_CASE   :List[Any]						=  [mem.copy() for i in range(1							)]
             __SCREAMING_SNAKE_CASE   :str						=  VGroup(*SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0							)
             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  Text('''GPU'''		,font_size=24							)
             __SCREAMING_SNAKE_CASE   :int						=  Group(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0.5		,aligned_edge=SCREAMING_SNAKE_CASE__							)
             gpu.align_to(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							)
             gpu.set_x(gpu.get_x() - 1							)

             self.add(SCREAMING_SNAKE_CASE__							)

             __SCREAMING_SNAKE_CASE   :str						=  [mem.copy() for i in range(6							)]
             __SCREAMING_SNAKE_CASE   :int						=  VGroup(*SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0							)

             __SCREAMING_SNAKE_CASE   :List[Any]						=  Text('''Model'''		,font_size=24							)
             __SCREAMING_SNAKE_CASE   :int						=  Group(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0.5		,aligned_edge=SCREAMING_SNAKE_CASE__							)
             model.move_to([3, -1.0, 0]							)

             self.play(
                 Create(SCREAMING_SNAKE_CASE__		,run_time=1							)		,Create(SCREAMING_SNAKE_CASE__		,run_time=1							)		,Create(SCREAMING_SNAKE_CASE__		,run_time=1							)		,)

             __SCREAMING_SNAKE_CASE   :List[str]						=  MarkupText(
                 f'''First, an empty model skeleton is loaded\ninto <span fgcolor=\'{YELLOW}\'>memory</span> without using much RAM.'''		,font_size=24		,)

             __SCREAMING_SNAKE_CASE   :List[Any]						=  Square(side_length=2.2							)
             key.move_to([-5, 2, 0]							)

             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  MarkupText(
                 f'''<b>Key:</b>\n\n<span fgcolor=\'{YELLOW}\'>●</span> Empty Model'''		,font_size=18		,)

             key_text.move_to([-5, 2.4, 0]							)

             step_a.move_to([2, 2, 0]							)
             self.play(Write(SCREAMING_SNAKE_CASE__		,run_time=2.5							)		,Write(SCREAMING_SNAKE_CASE__							)		,Write(SCREAMING_SNAKE_CASE__							)							)

             self.add(SCREAMING_SNAKE_CASE__							)

             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  []
             __SCREAMING_SNAKE_CASE   :int						=  []
             __SCREAMING_SNAKE_CASE   :List[Any]						=  []
             for i, rect in enumerate(SCREAMING_SNAKE_CASE__							):
                   __SCREAMING_SNAKE_CASE   :Any						=  Rectangle(height=0.4_6		,width=0.4_6							).set_stroke(width=0.0							).set_fill(SCREAMING_SNAKE_CASE__		,opacity=0.7							)
                   cpu_target.move_to(SCREAMING_SNAKE_CASE__							)
                   cpu_target.generate_target()
                   __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  0.4_6 / 4
                   __SCREAMING_SNAKE_CASE   :Tuple						=  0.4_6 / 3

                   if i == 0:
                         cpu_target.target.next_to(cpu_left_col_base[0].get_corner(DOWN + LEFT							)		,buff=0.0_2		,direction=SCREAMING_SNAKE_CASE__							)
                         cpu_target.target.set_x(cpu_target.target.get_x() + 0.1							)
                   elif i == 3:
                         cpu_target.target.next_to(cpu_targs[0].target		,direction=SCREAMING_SNAKE_CASE__		,buff=0.0							)
                   else:
                         cpu_target.target.next_to(cpu_targs[i - 1].target		,direction=SCREAMING_SNAKE_CASE__		,buff=0.0							)
                   cpu_targs.append(SCREAMING_SNAKE_CASE__							)

                   first_animations.append(rect.animate(run_time=0.5							).set_stroke(SCREAMING_SNAKE_CASE__							)							)
                   second_animations.append(MoveToTarget(SCREAMING_SNAKE_CASE__		,run_time=1.5							)							)

             self.play(*SCREAMING_SNAKE_CASE__							)
             self.play(*SCREAMING_SNAKE_CASE__							)

             self.wait()