
"""simple docstring"""





import json
import pathlib
import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision, slow
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin, prepare_image_inputs


if is_torch_available():
					import torch

if is_vision_available():
					from PIL import Image

					from transformers import DetaImageProcessor



class      a__				(	unittest.TestCase   ):


			def __init__(      self      :    str      ,  UpperCamelCase_      :    List[str]      ,  UpperCamelCase_      :    str=7      ,  UpperCamelCase_      :    Optional[Any]=3      ,  UpperCamelCase_      :    Tuple=30      ,  UpperCamelCase_      :    int=400      ,  UpperCamelCase_      :    Union[str, Any]=True      ,  UpperCamelCase_      :    Optional[Any]=None      ,  UpperCamelCase_      :    str=True      ,  UpperCamelCase_      :    Union[str, Any]=[0.5, 0.5, 0.5]      ,  UpperCamelCase_      :    Tuple=[0.5, 0.5, 0.5]      ,  UpperCamelCase_      :    Optional[int]=True      ,  UpperCamelCase_      :    Any=1 / 255      ,  UpperCamelCase_      :    Any=True      ,  ):


						"""simple docstring"""




						__UpperCAmelCase	: Union[str, Any]		=					size if size is not None else {"shortest_edge": 18, "longest_edge": 1333}
						__UpperCAmelCase	: Tuple		=					parent
						__UpperCAmelCase	: Tuple		=					batch_size
						__UpperCAmelCase	: int		=					num_channels
						__UpperCAmelCase	: Optional[int]		=					min_resolution
						__UpperCAmelCase	: List[str]		=					max_resolution
						__UpperCAmelCase	: Optional[int]		=					do_resize
						__UpperCAmelCase	: Optional[int]		=					size
						__UpperCAmelCase	: str		=					do_normalize
						__UpperCAmelCase	: Optional[int]		=					image_mean
						__UpperCAmelCase	: int		=					image_std
						__UpperCAmelCase	: str		=					do_rescale
						__UpperCAmelCase	: Any		=					rescale_factor
						__UpperCAmelCase	: Any		=					do_pad


			def       a_     (      self      :    Dict):


						"""simple docstring"""




						return {
						    "do_resize": self.do_resize,
						    "size": self.size,
						    "do_normalize": self.do_normalize,
						    "image_mean": self.image_mean,
						    "image_std": self.image_std,
						    "do_rescale": self.do_rescale,
						    "rescale_factor": self.rescale_factor,
						    "do_pad": self.do_pad,
						}


			def       a_     (      self      :    int      ,  UpperCamelCase_      :    List[Any]      ,  UpperCamelCase_      :    Tuple=False):


						"""simple docstring"""




						if not batched:
									__UpperCAmelCase	: Optional[Any]		=					image_inputs[0]
									if isinstance(UpperCamelCase_      ,  Image.Image):
												__UpperCAmelCase	,     __UpperCAmelCase	: Tuple		=					image.size
									else:
												__UpperCAmelCase	,     __UpperCAmelCase	: Optional[int]		=					image.shape[1], image.shape[2]
									if w < h:
												__UpperCAmelCase	: Union[str, Any]		=					int(self.size["shortest_edge"] * h / w)
												__UpperCAmelCase	: Optional[int]		=					self.size["shortest_edge"]
									elif w > h:
												__UpperCAmelCase	: List[str]		=					self.size["shortest_edge"]
												__UpperCAmelCase	: Tuple		=					int(self.size["shortest_edge"] * w / h)
									else:
												__UpperCAmelCase	: List[Any]		=					self.size["shortest_edge"]
												__UpperCAmelCase	: Tuple		=					self.size["shortest_edge"]

						else:
									__UpperCAmelCase	: str		=					[]
									for image in image_inputs:
												__UpperCAmelCase	,     __UpperCAmelCase	: int		=					self.get_expected_values([image])
												expected_values.append((expected_height, expected_width))
									__UpperCAmelCase	: int		=					max(UpperCamelCase_      ,  key=lambda UpperCamelCase_: item[0])[0]
									__UpperCAmelCase	: str		=					max(UpperCamelCase_      ,  key=lambda UpperCamelCase_: item[1])[1]

						return expected_height, expected_width






@require_torch
@require_vision
class      a__				(	_snake_case							,    unittest.TestCase   ):
			lowercase_    =	DetaImageProcessor if is_vision_available() else None


			def       a_     (      self      :    int):


						"""simple docstring"""




						__UpperCAmelCase	: Optional[int]		=					DetaImageProcessingTester(self)


			@property
			def       a_     (      self      :    int):


						"""simple docstring"""




						return self.image_processor_tester.prepare_image_processor_dict()


			def       a_     (      self      :    str):


						"""simple docstring"""




						__UpperCAmelCase	: List[Any]		=					self.image_processing_class(**self.image_processor_dict)
						self.assertTrue(hasattr(UpperCamelCase_      ,  "image_mean"))
						self.assertTrue(hasattr(UpperCamelCase_      ,  "image_std"))
						self.assertTrue(hasattr(UpperCamelCase_      ,  "do_normalize"))
						self.assertTrue(hasattr(UpperCamelCase_      ,  "do_resize"))
						self.assertTrue(hasattr(UpperCamelCase_      ,  "do_rescale"))
						self.assertTrue(hasattr(UpperCamelCase_      ,  "do_pad"))
						self.assertTrue(hasattr(UpperCamelCase_      ,  "size"))


			def       a_     (      self      :    str):


						"""simple docstring"""




						__UpperCAmelCase	: str		=					self.image_processing_class.from_dict(self.image_processor_dict)
						self.assertEqual(image_processor.size      ,  {"shortest_edge": 18, "longest_edge": 1333})
						self.assertEqual(image_processor.do_pad      ,  UpperCamelCase_)


			def       a_     (      self      :    Optional[int]):


						"""simple docstring"""




						pass


			def       a_     (      self      :    Tuple):


						"""simple docstring"""




						__UpperCAmelCase	: Optional[int]		=					self.image_processing_class(**self.image_processor_dict)
						# create random PIL images
						__UpperCAmelCase	: Optional[Any]		=					prepare_image_inputs(self.image_processor_tester      ,  equal_resolution=UpperCamelCase_)
						for image in image_inputs:
									self.assertIsInstance(UpperCamelCase_      ,  Image.Image)

						# Test not batched input
						__UpperCAmelCase	: str		=					image_processing(image_inputs[0]      ,  return_tensors="pt").pixel_values

						__UpperCAmelCase	,     __UpperCAmelCase	: Optional[int]		=					self.image_processor_tester.get_expected_values(UpperCamelCase_)

						self.assertEqual(
						    encoded_images.shape      ,  (1, self.image_processor_tester.num_channels, expected_height, expected_width)      ,  )

						# Test batched
						__UpperCAmelCase	,     __UpperCAmelCase	: List[str]		=					self.image_processor_tester.get_expected_values(UpperCamelCase_      ,  batched=UpperCamelCase_)

						__UpperCAmelCase	: str		=					image_processing(UpperCamelCase_      ,  return_tensors="pt").pixel_values
						self.assertEqual(
						    encoded_images.shape      ,  (
						        self.image_processor_tester.batch_size,
						        self.image_processor_tester.num_channels,
						        expected_height,
						        expected_width,
						    )      ,  )


			def       a_     (      self      :    Union[str, Any]):


						"""simple docstring"""




						__UpperCAmelCase	: Tuple		=					self.image_processing_class(**self.image_processor_dict)
						# create random numpy tensors
						__UpperCAmelCase	: Any		=					prepare_image_inputs(self.image_processor_tester      ,  equal_resolution=UpperCamelCase_      ,  numpify=UpperCamelCase_)
						for image in image_inputs:
									self.assertIsInstance(UpperCamelCase_      ,  np.ndarray)

						# Test not batched input
						__UpperCAmelCase	: Union[str, Any]		=					image_processing(image_inputs[0]      ,  return_tensors="pt").pixel_values

						__UpperCAmelCase	,     __UpperCAmelCase	: Dict		=					self.image_processor_tester.get_expected_values(UpperCamelCase_)

						self.assertEqual(
						    encoded_images.shape      ,  (1, self.image_processor_tester.num_channels, expected_height, expected_width)      ,  )

						# Test batched
						__UpperCAmelCase	: List[Any]		=					image_processing(UpperCamelCase_      ,  return_tensors="pt").pixel_values

						__UpperCAmelCase	,     __UpperCAmelCase	: Optional[int]		=					self.image_processor_tester.get_expected_values(UpperCamelCase_      ,  batched=UpperCamelCase_)

						self.assertEqual(
						    encoded_images.shape      ,  (
						        self.image_processor_tester.batch_size,
						        self.image_processor_tester.num_channels,
						        expected_height,
						        expected_width,
						    )      ,  )


			def       a_     (      self      :    Union[str, Any]):


						"""simple docstring"""




						__UpperCAmelCase	: Optional[int]		=					self.image_processing_class(**self.image_processor_dict)
						# create random PyTorch tensors
						__UpperCAmelCase	: List[str]		=					prepare_image_inputs(self.image_processor_tester      ,  equal_resolution=UpperCamelCase_      ,  torchify=UpperCamelCase_)
						for image in image_inputs:
									self.assertIsInstance(UpperCamelCase_      ,  torch.Tensor)

						# Test not batched input
						__UpperCAmelCase	: Union[str, Any]		=					image_processing(image_inputs[0]      ,  return_tensors="pt").pixel_values

						__UpperCAmelCase	,     __UpperCAmelCase	: Optional[Any]		=					self.image_processor_tester.get_expected_values(UpperCamelCase_)

						self.assertEqual(
						    encoded_images.shape      ,  (1, self.image_processor_tester.num_channels, expected_height, expected_width)      ,  )

						# Test batched
						__UpperCAmelCase	: Any		=					image_processing(UpperCamelCase_      ,  return_tensors="pt").pixel_values

						__UpperCAmelCase	,     __UpperCAmelCase	: Optional[Any]		=					self.image_processor_tester.get_expected_values(UpperCamelCase_      ,  batched=UpperCamelCase_)

						self.assertEqual(
						    encoded_images.shape      ,  (
						        self.image_processor_tester.batch_size,
						        self.image_processor_tester.num_channels,
						        expected_height,
						        expected_width,
						    )      ,  )


			@slow
			def       a_     (      self      :    Dict):


						"""simple docstring"""




						__UpperCAmelCase	: Union[str, Any]		=					Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png")
						with open("./tests/fixtures/tests_samples/COCO/coco_annotations.txt"      ,  "r") as f:
									__UpperCAmelCase	: List[Any]		=					json.loads(f.read())

						__UpperCAmelCase	: Dict		=					{"image_id": 39769, "annotations": target}

						# encode them
						__UpperCAmelCase	: Dict		=					DetaImageProcessor()
						__UpperCAmelCase	: Any		=					image_processing(images=UpperCamelCase_      ,  annotations=UpperCamelCase_      ,  return_tensors="pt")

						# verify pixel values
						__UpperCAmelCase	: List[Any]		=					torch.Size([1, 3, 800, 1066])
						self.assertEqual(encoding["pixel_values"].shape      ,  UpperCamelCase_)

						__UpperCAmelCase	: Tuple		=					torch.tensor([0.2796, 0.3138, 0.3481])
						self.assertTrue(torch.allclose(encoding["pixel_values"][0, 0, 0, :3]      ,  UpperCamelCase_      ,  atol=1e-4))

						# verify area
						__UpperCAmelCase	: Tuple		=					torch.tensor([5887.9600, 11250.2061, 489353.8438, 837122.7500, 147967.5156, 165732.3438])
						self.assertTrue(torch.allclose(encoding["labels"][0]["area"]      ,  UpperCamelCase_))
						# verify boxes
						__UpperCAmelCase	: Tuple		=					torch.Size([6, 4])
						self.assertEqual(encoding["labels"][0]["boxes"].shape      ,  UpperCamelCase_)
						__UpperCAmelCase	: Optional[int]		=					torch.tensor([0.5503, 0.2765, 0.0604, 0.2215])
						self.assertTrue(torch.allclose(encoding["labels"][0]["boxes"][0]      ,  UpperCamelCase_      ,  atol=1e-3))
						# verify image_id
						__UpperCAmelCase	: Union[str, Any]		=					torch.tensor([39769])
						self.assertTrue(torch.allclose(encoding["labels"][0]["image_id"]      ,  UpperCamelCase_))
						# verify is_crowd
						__UpperCAmelCase	: Dict		=					torch.tensor([0, 0, 0, 0, 0, 0])
						self.assertTrue(torch.allclose(encoding["labels"][0]["iscrowd"]      ,  UpperCamelCase_))
						# verify class_labels
						__UpperCAmelCase	: int		=					torch.tensor([75, 75, 63, 65, 17, 17])
						self.assertTrue(torch.allclose(encoding["labels"][0]["class_labels"]      ,  UpperCamelCase_))
						# verify orig_size
						__UpperCAmelCase	: Dict		=					torch.tensor([480, 640])
						self.assertTrue(torch.allclose(encoding["labels"][0]["orig_size"]      ,  UpperCamelCase_))
						# verify size
						__UpperCAmelCase	: List[str]		=					torch.tensor([800, 1066])
						self.assertTrue(torch.allclose(encoding["labels"][0]["size"]      ,  UpperCamelCase_))


			@slow
			def       a_     (      self      :    Dict):


						"""simple docstring"""




						__UpperCAmelCase	: List[Any]		=					Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png")
						with open("./tests/fixtures/tests_samples/COCO/coco_panoptic_annotations.txt"      ,  "r") as f:
									__UpperCAmelCase	: Union[str, Any]		=					json.loads(f.read())

						__UpperCAmelCase	: int		=					{"file_name": "000000039769.png", "image_id": 39769, "segments_info": target}

						__UpperCAmelCase	: Optional[int]		=					pathlib.Path("./tests/fixtures/tests_samples/COCO/coco_panoptic")

						# encode them
						__UpperCAmelCase	: List[str]		=					DetaImageProcessor(format="coco_panoptic")
						__UpperCAmelCase	: Any		=					image_processing(images=UpperCamelCase_      ,  annotations=UpperCamelCase_      ,  masks_path=UpperCamelCase_      ,  return_tensors="pt")

						# verify pixel values
						__UpperCAmelCase	: Dict		=					torch.Size([1, 3, 800, 1066])
						self.assertEqual(encoding["pixel_values"].shape      ,  UpperCamelCase_)

						__UpperCAmelCase	: List[str]		=					torch.tensor([0.2796, 0.3138, 0.3481])
						self.assertTrue(torch.allclose(encoding["pixel_values"][0, 0, 0, :3]      ,  UpperCamelCase_      ,  atol=1e-4))

						# verify area
						__UpperCAmelCase	: List[str]		=					torch.tensor([147979.6875, 165527.0469, 484638.5938, 11292.9375, 5879.6562, 7634.1147])
						self.assertTrue(torch.allclose(encoding["labels"][0]["area"]      ,  UpperCamelCase_))
						# verify boxes
						__UpperCAmelCase	: Optional[Any]		=					torch.Size([6, 4])
						self.assertEqual(encoding["labels"][0]["boxes"].shape      ,  UpperCamelCase_)
						__UpperCAmelCase	: Optional[Any]		=					torch.tensor([0.2625, 0.5437, 0.4688, 0.8625])
						self.assertTrue(torch.allclose(encoding["labels"][0]["boxes"][0]      ,  UpperCamelCase_      ,  atol=1e-3))
						# verify image_id
						__UpperCAmelCase	: List[str]		=					torch.tensor([39769])
						self.assertTrue(torch.allclose(encoding["labels"][0]["image_id"]      ,  UpperCamelCase_))
						# verify is_crowd
						__UpperCAmelCase	: List[str]		=					torch.tensor([0, 0, 0, 0, 0, 0])
						self.assertTrue(torch.allclose(encoding["labels"][0]["iscrowd"]      ,  UpperCamelCase_))
						# verify class_labels
						__UpperCAmelCase	: Optional[Any]		=					torch.tensor([17, 17, 63, 75, 75, 93])
						self.assertTrue(torch.allclose(encoding["labels"][0]["class_labels"]      ,  UpperCamelCase_))
						# verify masks
						__UpperCAmelCase	: Optional[int]		=					822873
						self.assertEqual(encoding["labels"][0]["masks"].sum().item()      ,  UpperCamelCase_)
						# verify orig_size
						__UpperCAmelCase	: Optional[int]		=					torch.tensor([480, 640])
						self.assertTrue(torch.allclose(encoding["labels"][0]["orig_size"]      ,  UpperCamelCase_))
						# verify size
						__UpperCAmelCase	: int		=					torch.tensor([800, 1066])
						self.assertTrue(torch.allclose(encoding["labels"][0]["size"]      ,  UpperCamelCase_))








"""simple docstring"""





from manim import *



class      a__				(	__magic_name__   ):


			def       a_     (      self      :    str):


						"""simple docstring"""




						__UpperCAmelCase	: List[str]		=					Rectangle(height=0.5      ,  width=0.5)
						__UpperCAmelCase	: List[str]		=					Rectangle(height=0.25      ,  width=0.25)
						__UpperCAmelCase	: Dict		=					Rectangle(height=0.46      ,  width=0.46).set_stroke(width=0)

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

						__UpperCAmelCase	: List[str]		=					[mem.copy() for i in range(4)]
						__UpperCAmelCase	: List[Any]		=					VGroup(*UpperCamelCase_).arrange(UpperCamelCase_      ,  buff=0)
						__UpperCAmelCase	: Tuple		=					Text("GPU"      ,  font_size=24)
						__UpperCAmelCase	: Tuple		=					Group(UpperCamelCase_      ,  UpperCamelCase_).arrange(UpperCamelCase_      ,  buff=0.5      ,  aligned_edge=UpperCamelCase_)
						gpu.move_to([-1, -1, 0])
						self.add(UpperCamelCase_)

						__UpperCAmelCase	: Any		=					[mem.copy() for i in range(6)]
						__UpperCAmelCase	: int		=					VGroup(*UpperCamelCase_).arrange(UpperCamelCase_      ,  buff=0)

						__UpperCAmelCase	: Union[str, Any]		=					Text("Model"      ,  font_size=24)
						__UpperCAmelCase	: Optional[Any]		=					Group(UpperCamelCase_      ,  UpperCamelCase_).arrange(UpperCamelCase_      ,  buff=0.5      ,  aligned_edge=UpperCamelCase_)
						model.move_to([3, -1.0, 0])
						self.add(UpperCamelCase_)

						__UpperCAmelCase	: str		=					[]
						__UpperCAmelCase	: Tuple		=					[]
						__UpperCAmelCase	: Any		=					[]

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

									__UpperCAmelCase	: Optional[int]		=					Rectangle(height=0.46 / 4      ,  width=0.46 / 3).set_stroke(width=0.0).set_fill(UpperCamelCase_      ,  opacity=0.7)

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

						self.add(*UpperCamelCase_      ,  *UpperCamelCase_      ,  *UpperCamelCase_)

						__UpperCAmelCase	: Optional[int]		=					[mem.copy() for i in range(6)]
						__UpperCAmelCase	: Dict		=					VGroup(*UpperCamelCase_).arrange(UpperCamelCase_      ,  buff=0)

						__UpperCAmelCase	: Tuple		=					Text("Loaded Checkpoint"      ,  font_size=24)
						__UpperCAmelCase	: Any		=					Group(UpperCamelCase_      ,  UpperCamelCase_).arrange(UpperCamelCase_      ,  buff=0.5      ,  aligned_edge=UpperCamelCase_)
						checkpoint.move_to([3, 0.5, 0])

						self.add(UpperCamelCase_)

						__UpperCAmelCase	: Optional[int]		=					[]
						__UpperCAmelCase	: int		=					[]

						for i, rect in enumerate(UpperCamelCase_):
									__UpperCAmelCase	: Optional[Any]		=					fill.copy().set_fill(UpperCamelCase_      ,  opacity=0.7)
									target.move_to(UpperCamelCase_)
									ckpt_arr.append(UpperCamelCase_)

									__UpperCAmelCase	: Optional[Any]		=					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(UpperCamelCase_)
						self.add(*UpperCamelCase_      ,  *UpperCamelCase_)

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

						__UpperCAmelCase	: int		=					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(UpperCamelCase_      ,  UpperCamelCase_)

						__UpperCAmelCase	: Optional[Any]		=					MarkupText(
						    F"<span fgcolor='{BLUE}'>●</span> Checkpoint"      ,  font_size=18      ,  )

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

						__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	: List[Any]		=					[meta_mem.copy() for i in range(6)]
						__UpperCAmelCase	: Optional[int]		=					[meta_mem.copy() for i in range(6)]
						__UpperCAmelCase	: int		=					VGroup(*UpperCamelCase_).arrange(UpperCamelCase_      ,  buff=0)
						__UpperCAmelCase	: Union[str, Any]		=					VGroup(*UpperCamelCase_).arrange(UpperCamelCase_      ,  buff=0)
						__UpperCAmelCase	: Tuple		=					VGroup(UpperCamelCase_      ,  UpperCamelCase_).arrange(UpperCamelCase_      ,  buff=0)
						__UpperCAmelCase	: Optional[int]		=					Text("Disk"      ,  font_size=24)
						__UpperCAmelCase	: str		=					Group(UpperCamelCase_      ,  UpperCamelCase_).arrange(UpperCamelCase_      ,  buff=0.5      ,  aligned_edge=UpperCamelCase_)
						disk.move_to([-4.0, -1.25, 0])
						self.play(Write(UpperCamelCase_      ,  run_time=3)      ,  Write(UpperCamelCase_      ,  run_time=1)      ,  Create(UpperCamelCase_      ,  run_time=1))

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

						self.play(FadeOut(UpperCamelCase_))

						__UpperCAmelCase	: Union[str, Any]		=					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(UpperCamelCase_      ,  run_time=3))

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

						self.wait()


