





import argparse
import json
import os
from pathlib import Path

import requests
import torch

from transformers import JukeboxConfig, JukeboxModel
from transformers.utils import logging


logging.set_verbosity_info()
UpperCAmelCase_  							=				logging.get_logger(__name__)


UpperCAmelCase_  							=				'https://openaipublic.azureedge.net/jukebox/models/'
UpperCAmelCase_  							=				{
    'jukebox-1b-lyrics': [
        '5b/vqvae.pth.tar',
        '5b/prior_level_0.pth.tar',
        '5b/prior_level_1.pth.tar',
        '1b_lyrics/prior_level_2.pth.tar',
    ],
    'jukebox-5b-lyrics': [
        '5b/vqvae.pth.tar',
        '5b/prior_level_0.pth.tar',
        '5b/prior_level_1.pth.tar',
        '5b_lyrics/prior_level_2.pth.tar',
    ],
}




def 	lowerCAmelCase_					(						__UpperCAmelCase:    Union[str, Any]   )   ->			Union[str, Any]:
    if key.endswith('''.model.1.bias'''   ) and len(key.split('''.'''   )   ) > 10:
        UpperCamelCase__							:       Optional[Any]      =   key.replace('''.model.1.bias'''	,     '''.conv1d_1.bias'''   )
    elif key.endswith('''.model.1.weight'''   ) and len(key.split('''.'''   )   ) > 10:
        UpperCamelCase__							:       str      =   key.replace('''.model.1.weight'''	,     '''.conv1d_1.weight'''   )
    elif key.endswith('''.model.3.bias'''   ) and len(key.split('''.'''   )   ) > 10:
        UpperCamelCase__							:       List[str]      =   key.replace('''.model.3.bias'''	,     '''.conv1d_2.bias'''   )
    elif key.endswith('''.model.3.weight'''   ) and len(key.split('''.'''   )   ) > 10:
        UpperCamelCase__							:       Optional[Any]      =   key.replace('''.model.3.weight'''	,     '''.conv1d_2.weight'''   )

    if "conditioner_blocks.0." in key:
        UpperCamelCase__							:       int      =   key.replace('''conditioner_blocks.0'''	,     '''conditioner_blocks'''   )

    if "prime_prior" in key:
        UpperCamelCase__							:       Tuple      =   key.replace('''prime_prior'''	,     '''encoder'''   )

    if ".emb." in key and "total" not in key and "absolute" not in key and "relative" not in key:
        UpperCamelCase__							:       Optional[Any]      =   key.replace('''.emb.'''	,     '''.'''   )

    if key.endswith('''k'''   ):  # replace vqvae.X.k with vqvae.X.codebook
        return key.replace('''.k'''	,     '''.codebook'''   )
    if "y_emb." in key:
        return key.replace('''y_emb.'''	,     '''metadata_embedding.'''   )

    if "x_emb.emb." in key:
        UpperCamelCase__							:       List[Any]      =   key.replace('''0.x_emb.emb'''	,     '''embed_tokens'''   )

    if "prime_state_ln" in key:
        return key.replace('''prime_state_ln'''	,     '''encoder.final_layer_norm'''   )
    if ".ln" in key:
        return key.replace('''.ln'''	,     '''.layer_norm'''   )
    if "_ln" in key:
        return key.replace('''_ln'''	,     '''_layer_norm'''   )

    if "prime_state_proj" in key:
        return key.replace('''prime_state_proj'''	,     '''encoder.proj_in'''   )
    if "prime_x_out" in key:
        return key.replace('''prime_x_out'''	,     '''encoder.lm_head'''   )
    if "prior.x_out" in key:
        return key.replace('''x_out'''	,     '''fc_proj_out'''   )
    if "x_emb" in key:
        return key.replace('''x_emb'''	,     '''embed_tokens'''   )

    return key




def 	lowerCAmelCase_					(						__UpperCAmelCase:    Optional[int]	,     __UpperCAmelCase:    Optional[Any]	,     __UpperCAmelCase:    List[Any]	,     __UpperCAmelCase:    Optional[int]   )   ->			List[str]:
    UpperCamelCase__							:       Dict      =   {}
    import re

    UpperCamelCase__							:       List[str]      =   re.compile(r'''encoders.(\d*).level_blocks.(\d*).model.(\d*).(\d).(bias|weight)'''   )
    UpperCamelCase__							:       Union[str, Any]      =   re.compile(
        r'''encoders.(\d*).level_blocks.(\d*).model.(\d*).(\d).model.(\d*).model.(\d*).(bias|weight)'''   )
    UpperCamelCase__							:       Any      =   re.compile(r'''encoders.(\d*).level_blocks.(\d*).model.(\d*).(bias|weight)'''   )

    UpperCamelCase__							:       List[str]      =   re.compile(r'''decoders.(\d*).level_blocks.(\d*).model.(\d*).(\d).(bias|weight)'''   )
    UpperCamelCase__							:       str      =   re.compile(
        r'''decoders.(\d*).level_blocks.(\d*).model.(\d*).(\d).model.(\d*).model.(\d*).(bias|weight)'''   )
    UpperCamelCase__							:       Optional[int]      =   re.compile(r'''decoders.(\d*).level_blocks.(\d*).model.(\d*).(bias|weight)'''   )

    UpperCamelCase__							:       Tuple      =   re.compile(r'''conditioner_blocks.(\d*).cond.model.(\d*).(\d).(bias|weight)'''   )
    UpperCamelCase__							:       List[Any]      =   re.compile(
        r'''conditioner_blocks.(\d*).cond.model.(\d*).(\d).model.(\d*).model.(\d*).(bias|weight)'''   )
    UpperCamelCase__							:       Optional[Any]      =   re.compile(r'''conditioner_blocks.(\d*).cond.model.(\d*).(bias|weight)'''   )

    for original_key, value in state_dict.items():
        # rename vqvae.encoder keys
        if re_encoder_block_conv_in.fullmatch(__UpperCAmelCase   ):
            UpperCamelCase__							:       List[Any]      =   re_encoder_block_conv_in.match(__UpperCAmelCase   )
            UpperCamelCase__							:       Tuple      =   regex_match.groups()
            UpperCamelCase__							:       List[Any]      =   int(groups[2]   ) * 2 + int(groups[3]   )
            UpperCamelCase__							:       List[str]      =   f"encoders.{groups[0]}.level_blocks.{groups[1]}.downsample_block.{block_index}.{groups[-1]}"
            UpperCamelCase__							:       Dict      =   re_encoder_block_conv_in.sub(__UpperCAmelCase	,     __UpperCAmelCase   )

        elif re_encoder_block_resnet.fullmatch(__UpperCAmelCase   ):
            UpperCamelCase__							:       List[Any]      =   re_encoder_block_resnet.match(__UpperCAmelCase   )
            UpperCamelCase__							:       Tuple      =   regex_match.groups()
            UpperCamelCase__							:       str      =   int(groups[2]   ) * 2 + int(groups[3]   )
            UpperCamelCase__							:       Optional[int]      =   {'''1''': 1, '''3''': 2}[groups[-2]]
            UpperCamelCase__							:       int      =   f"encoders.{groups[0]}.level_blocks.{groups[1]}.downsample_block.{block_index}."
            UpperCamelCase__							:       str      =   f"resnet_block.{groups[-3]}.conv1d_{conv_index}.{groups[-1]}"
            UpperCamelCase__							:       Optional[Any]      =   prefix + resnet_block
            UpperCamelCase__							:       Optional[int]      =   re_encoder_block_resnet.sub(__UpperCAmelCase	,     __UpperCAmelCase   )

        elif re_encoder_block_proj_out.fullmatch(__UpperCAmelCase   ):
            UpperCamelCase__							:       Any      =   re_encoder_block_proj_out.match(__UpperCAmelCase   )
            UpperCamelCase__							:       Any      =   regex_match.groups()
            UpperCamelCase__							:       Optional[int]      =   f"encoders.{groups[0]}.level_blocks.{groups[1]}.proj_out.{groups[-1]}"
            UpperCamelCase__							:       int      =   re_encoder_block_proj_out.sub(__UpperCAmelCase	,     __UpperCAmelCase   )

        # rename vqvae.decoder keys
        elif re_decoder_block_conv_out.fullmatch(__UpperCAmelCase   ):
            UpperCamelCase__							:       Tuple      =   re_decoder_block_conv_out.match(__UpperCAmelCase   )
            UpperCamelCase__							:       Dict      =   regex_match.groups()
            UpperCamelCase__							:       List[str]      =   int(groups[2]   ) * 2 + int(groups[3]   ) - 2
            UpperCamelCase__							:       Union[str, Any]      =   f"decoders.{groups[0]}.level_blocks.{groups[1]}.upsample_block.{block_index}.{groups[-1]}"
            UpperCamelCase__							:       Optional[Any]      =   re_decoder_block_conv_out.sub(__UpperCAmelCase	,     __UpperCAmelCase   )

        elif re_decoder_block_resnet.fullmatch(__UpperCAmelCase   ):
            UpperCamelCase__							:       Tuple      =   re_decoder_block_resnet.match(__UpperCAmelCase   )
            UpperCamelCase__							:       str      =   regex_match.groups()
            UpperCamelCase__							:       Optional[Any]      =   int(groups[2]   ) * 2 + int(groups[3]   ) - 2
            UpperCamelCase__							:       Any      =   {'''1''': 1, '''3''': 2}[groups[-2]]
            UpperCamelCase__							:       Union[str, Any]      =   f"decoders.{groups[0]}.level_blocks.{groups[1]}.upsample_block.{block_index}."
            UpperCamelCase__							:       Dict      =   f"resnet_block.{groups[-3]}.conv1d_{conv_index}.{groups[-1]}"
            UpperCamelCase__							:       List[Any]      =   prefix + resnet_block
            UpperCamelCase__							:       Dict      =   re_decoder_block_resnet.sub(__UpperCAmelCase	,     __UpperCAmelCase   )

        elif re_decoder_block_proj_in.fullmatch(__UpperCAmelCase   ):
            UpperCamelCase__							:       Dict      =   re_decoder_block_proj_in.match(__UpperCAmelCase   )
            UpperCamelCase__							:       int      =   regex_match.groups()
            UpperCamelCase__							:       str      =   f"decoders.{groups[0]}.level_blocks.{groups[1]}.proj_in.{groups[-1]}"
            UpperCamelCase__							:       List[str]      =   re_decoder_block_proj_in.sub(__UpperCAmelCase	,     __UpperCAmelCase   )

        # rename prior cond.model to upsampler.upsample_block and resnet
        elif re_prior_cond_conv_out.fullmatch(__UpperCAmelCase   ):
            UpperCamelCase__							:       Any      =   re_prior_cond_conv_out.match(__UpperCAmelCase   )
            UpperCamelCase__							:       Optional[int]      =   regex_match.groups()
            UpperCamelCase__							:       Any      =   int(groups[1]   ) * 2 + int(groups[2]   ) - 2
            UpperCamelCase__							:       Any      =   f"conditioner_blocks.upsampler.upsample_block.{block_index}.{groups[-1]}"
            UpperCamelCase__							:       Optional[int]      =   re_prior_cond_conv_out.sub(__UpperCAmelCase	,     __UpperCAmelCase   )

        elif re_prior_cond_resnet.fullmatch(__UpperCAmelCase   ):
            UpperCamelCase__							:       Any      =   re_prior_cond_resnet.match(__UpperCAmelCase   )
            UpperCamelCase__							:       List[str]      =   regex_match.groups()
            UpperCamelCase__							:       str      =   int(groups[1]   ) * 2 + int(groups[2]   ) - 2
            UpperCamelCase__							:       Any      =   {'''1''': 1, '''3''': 2}[groups[-2]]
            UpperCamelCase__							:       Tuple      =   f"conditioner_blocks.upsampler.upsample_block.{block_index}."
            UpperCamelCase__							:       List[Any]      =   f"resnet_block.{groups[-3]}.conv1d_{conv_index}.{groups[-1]}"
            UpperCamelCase__							:       Dict      =   prefix + resnet_block
            UpperCamelCase__							:       List[str]      =   re_prior_cond_resnet.sub(__UpperCAmelCase	,     __UpperCAmelCase   )

        elif re_prior_cond_proj_in.fullmatch(__UpperCAmelCase   ):
            UpperCamelCase__							:       Union[str, Any]      =   re_prior_cond_proj_in.match(__UpperCAmelCase   )
            UpperCamelCase__							:       Dict      =   regex_match.groups()
            UpperCamelCase__							:       List[str]      =   f"conditioner_blocks.upsampler.proj_in.{groups[-1]}"
            UpperCamelCase__							:       Optional[int]      =   re_prior_cond_proj_in.sub(__UpperCAmelCase	,     __UpperCAmelCase   )

        # keep original key
        else:
            UpperCamelCase__							:       List[str]      =   original_key

        UpperCamelCase__							:       Tuple      =   replace_key(__UpperCAmelCase   )

        if f"{key_prefix}.{key}" not in model_state_dict or key is None:
            print(f"failed converting {original_key} to {key}, does not match"   )

        # handle missmatched shape
        elif value.shape != model_state_dict[f"{key_prefix}.{key}"].shape:
            UpperCamelCase__							:       Any      =   model_state_dict[f"{key_prefix}.{key}"]
            print(f"{original_key}-> {key} : \nshape {val.shape} and { value.shape}, do not match"   )
            UpperCamelCase__							:       Optional[int]      =   original_key

        UpperCamelCase__							:       Any      =   original_key
        UpperCamelCase__							:       Union[str, Any]      =   value

    return new_dict




@torch.no_grad()
def 	lowerCAmelCase_					(						__UpperCAmelCase:    str=None	,     __UpperCAmelCase:    List[Any]=None   )   ->			int:
    for file in MODEL_MAPPING[model_name]:
        if not os.path.isfile(f"{pytorch_dump_folder_path}/{file.split('/'   )[-1]}"   ):
            UpperCamelCase__							:       Tuple      =   requests.get(f"{PREFIX}{file}"	,     allow_redirects=__UpperCAmelCase   )
            os.makedirs(f"{pytorch_dump_folder_path}/"	,     exist_ok=__UpperCAmelCase   )
            open(f"{pytorch_dump_folder_path}/{file.split('/'   )[-1]}"	,     '''wb'''   ).write(r.content   )

    UpperCamelCase__							:       Union[str, Any]      =   MODEL_MAPPING[model_name.split('''/'''   )[-1]]

    UpperCamelCase__							:       List[str]      =   JukeboxConfig.from_pretrained(__UpperCAmelCase   )
    UpperCamelCase__							:       int      =   JukeboxModel(__UpperCAmelCase   )

    UpperCamelCase__							:       List[Any]      =   []
    UpperCamelCase__							:       List[Any]      =   {}
    for i, dict_name in enumerate(__UpperCAmelCase   ):
        UpperCamelCase__							:       Dict      =   torch.load(f"{pytorch_dump_folder_path}/{dict_name.split('/'   )[-1]}"   )['''model''']

        UpperCamelCase__							:       Optional[Any]      =   {}
        for k in old_dic.keys():
            if k.endswith('''.b'''   ):
                UpperCamelCase__							:       List[str]      =   old_dic[k]
            elif k.endswith('''.w'''   ):
                UpperCamelCase__							:       List[Any]      =   old_dic[k]
            elif "level_2" not in dict_name and "cond.model." in k:
                UpperCamelCase__							:       int      =   old_dic[k]
            else:
                UpperCamelCase__							:       Tuple      =   old_dic[k]

        UpperCamelCase__							:       List[Any]      =   '''vqvae''' if i == 0 else f"priors.{3 - i}"
        UpperCamelCase__							:       Optional[int]      =   fix_jukebox_keys(__UpperCAmelCase	,     model.state_dict()	,     __UpperCAmelCase	,     __UpperCAmelCase   )
        weight_dict.append(__UpperCAmelCase   )

    UpperCamelCase__							:       List[str]      =   weight_dict.pop(0   )
    model.vqvae.load_state_dict(__UpperCAmelCase   )
    for i in range(len(__UpperCAmelCase   )   ):
        model.priors[i].load_state_dict(weight_dict[2 - i]   )

    Path(__UpperCAmelCase   ).mkdir(exist_ok=__UpperCAmelCase   )
    with open(f"{pytorch_dump_folder_path}/mapping.json"	,     '''w'''   ) as txtfile:
        json.dump(__UpperCAmelCase	,     __UpperCAmelCase   )

    print(f"Saving model {model_name} to {pytorch_dump_folder_path}"   )
    model.save_pretrained(__UpperCAmelCase   )

    return weight_dict


if __name__ == "__main__":
  UpperCAmelCase_  							=				argparse.ArgumentParser()
  # Required parameters
  parser.add_argument(
      '--model_name',
      default='jukebox-5b-lyrics',
      type=str,
      help='Name of the model you\'d like to convert.',
  )
  parser.add_argument(
      '--pytorch_dump_folder_path',
      default='jukebox-5b-lyrics-converted',
      type=str,
      help='Path to the output PyTorch model directory.',
  )
  UpperCAmelCase_  							=				parser.parse_args()
  convert_openai_checkpoint(args.model_name, args.pytorch_dump_folder_path)








from manim import *






class 					lowercase__ (			__lowerCamelCase       ):

   '''simple docstring'''


   def    UpperCamelCase__						(					self							)				->   List[str]:






       """simple docstring"""
       UpperCamelCase__							:       Any      =   Rectangle(height=0.5,	width=0.5							)
       UpperCamelCase__							:       Any      =   Rectangle(height=0.25,	width=0.25							)
       UpperCamelCase__							:       Dict      =   Rectangle(height=0.46,	width=0.46							).set_stroke(width=0							)

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

       UpperCamelCase__							:       int      =   [mem.copy() for i in range(4							)]
       UpperCamelCase__							:       str      =   VGroup(*__magic_name__							).arrange(__magic_name__,	buff=0							)
       UpperCamelCase__							:       Tuple      =   Text('''GPU''',	font_size=24							)
       UpperCamelCase__							:       str      =   Group(__magic_name__,	__magic_name__							).arrange(__magic_name__,	buff=0.5,	aligned_edge=__magic_name__							)
       gpu.move_to([-1, -1, 0]							)
       self.add(__magic_name__							)

       UpperCamelCase__							:       str      =   [mem.copy() for i in range(6							)]
       UpperCamelCase__							:       Tuple      =   VGroup(*__magic_name__							).arrange(__magic_name__,	buff=0							)

       UpperCamelCase__							:       Tuple      =   Text('''Model''',	font_size=24							)
       UpperCamelCase__							:       Tuple      =   Group(__magic_name__,	__magic_name__							).arrange(__magic_name__,	buff=0.5,	aligned_edge=__magic_name__							)
       model.move_to([3, -1.0, 0]							)
       self.add(__magic_name__							)

       UpperCamelCase__							:       Union[str, Any]      =   []
       UpperCamelCase__							:       Any      =   []
       UpperCamelCase__							:       List[Any]      =   []

       for i, rect in enumerate(__magic_name__							):
           rect.set_stroke(__magic_name__							)

           UpperCamelCase__							:       Tuple      =   Rectangle(height=0.46 / 4,	width=0.46 / 3							).set_stroke(width=0.0							).set_fill(__magic_name__,	opacity=0.7							)

           if i == 0:
               cpu_target.next_to(cpu_left_col_base[0].get_corner(DOWN + LEFT							),	buff=0.02,	direction=__magic_name__							)
               cpu_target.set_x(cpu_target.get_x() + 0.1							)
           elif i == 3:
               cpu_target.next_to(model_cpu_arr[0],	direction=__magic_name__,	buff=0.0							)
           else:
               cpu_target.next_to(model_cpu_arr[i - 1],	direction=__magic_name__,	buff=0.0							)
           self.add(__magic_name__							)
           model_cpu_arr.append(__magic_name__							)

       self.add(*__magic_name__,	*__magic_name__,	*__magic_name__							)

       UpperCamelCase__							:       Tuple      =   [mem.copy() for i in range(6							)]
       UpperCamelCase__							:       Dict      =   VGroup(*__magic_name__							).arrange(__magic_name__,	buff=0							)

       UpperCamelCase__							:       List[str]      =   Text('''Loaded Checkpoint''',	font_size=24							)
       UpperCamelCase__							:       Optional[Any]      =   Group(__magic_name__,	__magic_name__							).arrange(__magic_name__,	buff=0.5,	aligned_edge=__magic_name__							)
       checkpoint.move_to([3, 0.5, 0]							)

       self.add(__magic_name__							)

       UpperCamelCase__							:       Tuple      =   []
       UpperCamelCase__							:       List[str]      =   []

       for i, rect in enumerate(__magic_name__							):
           UpperCamelCase__							:       Optional[int]      =   fill.copy().set_fill(__magic_name__,	opacity=0.7							)
           target.move_to(__magic_name__							)
           ckpt_arr.append(__magic_name__							)

           UpperCamelCase__							:       int      =   target.copy()
           if i < 5:
               cpu_target.move_to(cpu_left_col_base[i + 1]							)
           else:
               cpu_target.move_to(cpu_right_col_base[i - 5]							)
           ckpt_cpu_arr.append(__magic_name__							)
       self.add(*__magic_name__,	*__magic_name__							)

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

       UpperCamelCase__							:       List[str]      =   MarkupText(
           f"<b>Key:</b>\n\n<span fgcolor='{YELLOW}'>●</span> Empty Model",	font_size=18,	)

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

       self.add(__magic_name__,	__magic_name__							)

       UpperCamelCase__							:       Any      =   MarkupText(
           f"<span fgcolor='{BLUE}'>●</span> Checkpoint",	font_size=18,	)

       blue_text.next_to(__magic_name__,	DOWN * 2.4,	aligned_edge=key_text.get_left()							)
       self.add(__magic_name__							)

       UpperCamelCase__							:       Dict      =   MarkupText(
           f"Based on the passed in configuration, weights are stored in\na variety of np.memmaps on disk or to a particular device.",	font_size=24,	)
       step_a.move_to([2, 2, 0]							)

       UpperCamelCase__							:       Any      =   [meta_mem.copy() for i in range(6							)]
       UpperCamelCase__							:       int      =   [meta_mem.copy() for i in range(6							)]
       UpperCamelCase__							:       Optional[int]      =   VGroup(*__magic_name__							).arrange(__magic_name__,	buff=0							)
       UpperCamelCase__							:       Union[str, Any]      =   VGroup(*__magic_name__							).arrange(__magic_name__,	buff=0							)
       UpperCamelCase__							:       Union[str, Any]      =   VGroup(__magic_name__,	__magic_name__							).arrange(__magic_name__,	buff=0							)
       UpperCamelCase__							:       Any      =   Text('''Disk''',	font_size=24							)
       UpperCamelCase__							:       List[Any]      =   Group(__magic_name__,	__magic_name__							).arrange(__magic_name__,	buff=0.5,	aligned_edge=__magic_name__							)
       disk.move_to([-4.0, -1.25, 0]							)
       self.play(Write(__magic_name__,	run_time=3							),	Write(__magic_name__,	run_time=1							),	Create(__magic_name__,	run_time=1							)							)

       UpperCamelCase__							:       Union[str, Any]      =   []
       for i, rect in enumerate(__magic_name__							):
           UpperCamelCase__							:       Union[str, Any]      =   rect.copy()
           target.generate_target()
           target.target.move_to(disk_left_col_base[i]							).scale(0.5							)
           animations.append(MoveToTarget(__magic_name__,	run_time=1.5							)							)
       self.play(*__magic_name__							)

       self.play(FadeOut(__magic_name__							)							)

       UpperCamelCase__							:       Optional[int]      =   MarkupText(f"Then, the checkpoint is removed from memory\nthrough garbage collection.",	font_size=24							)
       step_a.move_to([2, 2, 0]							)

       self.play(Write(__magic_name__,	run_time=3							)							)

       self.play(
           FadeOut(__magic_name__,	__magic_name__,	*__magic_name__,	*__magic_name__							),	)

       self.wait()

