

from manim import *






class 	__magic_name__    (			lowerCAmelCase_      ):





			def 		__magic_name__    (		self					)   -> Union[str, Any]:




						'''simple docstring'''
						__a        =Rectangle(height=0.5					,  width=0.5					)
						__a        =Rectangle(height=0.46					,  width=0.46					).set_stroke(width=0					)

						__a        =[mem.copy() for i in range(6					)]
						__a        =[mem.copy() for i in range(6					)]
						__a        =VGroup(*__snake_case					).arrange(__snake_case					,  buff=0					)
						__a        =VGroup(*__snake_case					).arrange(__snake_case					,  buff=0					)
						__a        =VGroup(__snake_case					,  __snake_case					).arrange(__snake_case					,  buff=0					)
						__a        =Text('CPU'					,  font_size=24					)
						__a        =Group(__snake_case					,  __snake_case					).arrange(__snake_case					,  buff=0.5					,  aligned_edge=__snake_case					)
						cpu.move_to([-2.5, -0.5, 0]					)
						self.add(__snake_case					)

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

						__a        =[mem.copy() for i in range(6					)]
						__a        =VGroup(*__snake_case					).arrange(__snake_case					,  buff=0					)

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

						__a        =[]
						for i, rect in enumerate(__snake_case					):
									rect.set_stroke(__snake_case					)
									# target = fill.copy().set_fill(YELLOW, opacity=0.7)
									# target.move_to(rect)
									# self.add(target)

									__a        =Rectangle(height=0.46 / 4					,  width=0.46 / 3					).set_stroke(width=0.0					).set_fill(__snake_case					,  opacity=0.7					)

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

						__a        =[mem.copy() for i in range(6					)]
						__a        =VGroup(*__snake_case					).arrange(__snake_case					,  buff=0					)

						__a        =Text('Loaded Checkpoint'					,  font_size=24					)
						__a        =Group(__snake_case					,  __snake_case					).arrange(__snake_case					,  aligned_edge=__snake_case					,  buff=0.4					)
						checkpoint.move_to([3, 0.5, 0]					)

						__a        =Square(side_length=2.2					)
						key.move_to([-5, 2, 0]					)

						__a        =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(__snake_case					,  __snake_case					)

						__a        =MarkupText(
						    f'<span fgcolor=\'{BLUE}\'>●</span> Checkpoint'					,  font_size=18					,  )

						blue_text.next_to(__snake_case					,  DOWN * 2.4					,  aligned_edge=key_text.get_left()					)

						__a        =MarkupText(
						    f'Next, a <i><span fgcolor="{BLUE}">second</span></i> model is loaded into memory,\nwith the weights of a <span fgcolor="{BLUE}">single shard</span>.'					,  font_size=24					,  )
						step_a.move_to([2, 2, 0]					)
						self.play(Write(__snake_case					)					,  Write(__snake_case					)					)

						self.play(Write(__snake_case					,  run_time=1					)					,  Create(__snake_case					,  run_time=1					)					)

						__a        =[]
						__a        =[]
						for i, rect in enumerate(__snake_case					):
									__a        =fill.copy().set_fill(__snake_case					,  opacity=0.7					)
									target.move_to(__snake_case					)
									first_animations.append(GrowFromCenter(__snake_case					,  run_time=1					)					)

									__a        =target.copy()
									cpu_target.generate_target()
									if i < 5:
												cpu_target.target.move_to(cpu_left_col_base[i + 1]					)
									else:
												cpu_target.target.move_to(cpu_right_col_base[i - 5]					)
									second_animations.append(MoveToTarget(__snake_case					,  run_time=1.5					)					)

						self.play(*__snake_case					)
						self.play(*__snake_case					)
						self.wait()












"""simple docstring"""






def      _snake_case			(				lowercase__		):
				if not isinstance(lowercase__							,    lowercase__		):
								raise ValueError('Input series is not valid, valid series - [2, 4, 6]'		)
				if len(lowercase__		) == 0:
								raise ValueError('Input list must be a non empty list'		)
				if len(lowercase__		) == 1:
								return True
				_lowerCamelCase     :			List[Any]    =    series[1] - series[0]
				for index in range(len(lowercase__		) - 1		):
								if series[index + 1] - series[index] != common_diff:
												return False
				return True







def      _snake_case			(				lowercase__		):
				if not isinstance(lowercase__							,    lowercase__		):
								raise ValueError('Input series is not valid, valid series - [2, 4, 6]'		)
				if len(lowercase__		) == 0:
								raise ValueError('Input list must be a non empty list'		)
				_lowerCamelCase     :			Optional[int]    =    0
				for val in series:
								answer += val
				return answer / len(lowercase__		)


if __name__ == "__main__":
			import doctest

			doctest.testmod()